Skip to content

Commit fc1e814

Browse files
committed
Update FKF URL to MOHU Budapest
1 parent 66e58ac commit fc1e814

6 files changed

Lines changed: 28 additions & 26 deletions

File tree

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
# FKF Budapest Garbage Collection custom component for Home Assistant
66

7-
This custom component provides garbage collection schedule from FKF Budapest Department of Public
8-
for a configurable address. It also supports green garbage collection schedule (FKF Budapest treats
7+
This custom component provides garbage collection schedule from MOHU Budapest Department of Public
8+
for a configurable address. It also supports green garbage collection schedule (MOHU Budapest treats
99
it differently)
1010

1111
The state of the sensor will be the number of days to the first upcoming garbage collection date.
1212

1313
The sensor will also report in an attribute the status of the latest data fetch.
1414

15-
The FKF Garbage Collection sensors can also be added to appear in HASS calendar. Calendar entries will be prefixed
15+
The MOHU Budapest Garbage Collection sensors can also be added to appear in HASS calendar. Calendar entries will be prefixed
1616
with the friendly name of the sensor to support and distinguish schedule for multiple such sensors/addresses. Translation of
1717
the calendar entries is also available through the calendar_lang option; so far only Hungarian and English are supported.
1818
Language tags should follow [IANA subtag registry](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry).
@@ -24,8 +24,8 @@ search for <i>FKF Budapest Garbage</i> in the Integrations.<br />
2424
Sensors of this platform should be configured as per below information.
2525

2626
#### Configuration:
27-
Define sensors with the following configuration parameters according to [FKF Hulladéknaptár](https://www.fkf.hu/hulladeknaptar/)
28-
for Budapest or [FKF Hulladéknaptár](https://www.fkf.hu/hulladeknaptar-budaors) for Budaörs.<br />
27+
Define sensors with the following configuration parameters according to [MOHU Budapest Hulladéknaptár](https://mohubudapest.hu/hulladeknaptar/)
28+
for Budapest or [MOHU Budapest Hulladéknaptár](https://mohubudapest.hu/hulladeknaptar-budaors) for Budaörs.<br />
2929

3030
---
3131
| Name | Optional | `Default` | Description |
@@ -36,15 +36,15 @@ for Budapest or [FKF Hulladéknaptár](https://www.fkf.hu/hulladeknaptar-budaors
3636
| publicplace | **N** | - | Name of public place |
3737
| housenr | **Y** | `1` | House number (only for Budapest) |
3838
| offsetdays | **Y** | `0` | Optional offset for the number of days left (usually 1) |
39-
| calendar | **Y** | `false` | Show FKF schedule in calendar |
39+
| calendar | **Y** | `false` | Show MOHU Budapest schedule in calendar |
4040
| calendar_lang | **Y** | `en` | Language to display garbage type in calendar |
4141
| green | **Y** | `false` | Include green garbage schedule as well |
4242
| greencolor | **Y** | `` | Use map color for districts that have different green garbage collecting days per region (see below) |
4343
---
4444

45-
For green garbage collection, `greencolor`, if defined, takes precedence over `publicplace`-`housenr`. Color name can be fetched from the source of the webpage `www.fkf.hu/kerti-zoldhulladek-korzetek-<districts_roman_number>-kerulet` and is one of these: `kek`, `lila`, `narancs`, `rozsaszin`, `sarga`. `greencolor` is not necessary if the whole district has green garbage collection on one specific day. `greencolor` has to be defined for Budapest districts.
45+
For green garbage collection, `greencolor`, if defined, takes precedence over `publicplace`-`housenr`. Color name can be fetched from the source of the webpage `mohubudapest.hu/kerti-zoldhulladek-korzetek-<districts_roman_number>-kerulet` and is one of these: `kek`, `lila`, `narancs`, `rozsaszin`, `sarga`. `greencolor` is not necessary if the whole district has green garbage collection on one specific day. `greencolor` has to be defined for Budapest districts.
4646

47-
Green garbage collection related attribute will not be included when the green garbage collection service is suspended during winter time ([FKF Zöldhulladék](https://www.fkf.hu/kerti-zoldhulladek-gyujtes)).
47+
Green garbage collection related attribute will not be included when the green garbage collection service is suspended during winter time ([MOHU Budapest Zöldhulladék](https://mohubudapest.hu/kerti-zoldhulladek-gyujtes)).
4848

4949
#### Example
5050
```

custom_components/fkf-garbage-collection/const.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
CALENDAR_PLATFORM = "calendar"
33
DOMAIN = "fkf_garbage_collection"
44
SENSOR_PLATFORM = "sensor"
5+
URL = "mohubudapest.hu"

custom_components/fkf-garbage-collection/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"dependencies": [],
66
"config_flow": false,
77
"codeowners": ["@amaximus"],
8-
"version": "0.8.10",
8+
"version": "0.9.0",
99
"iot_class": "cloud_polling",
1010
"requirements": ["lxml", "voluptuous"]
1111
}

custom_components/fkf-garbage-collection/sensor.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@
2222
CALENDAR_NAME,
2323
CALENDAR_PLATFORM,
2424
SENSOR_PLATFORM,
25+
URL,
2526
)
2627

2728
REQUIREMENTS = [ ]
2829

2930
_LOGGER = logging.getLogger(__name__)
3031

31-
CONF_ATTRIBUTION = "Data provided by fkf.hu"
32+
CONF_ATTRIBUTION = "Data provided by " + URL
3233
CONF_ZIPCODE = 'zipcode'
3334
CONF_PUBLICPLACE = 'publicplace'
3435
CONF_HOUSENR = 'housenr'
@@ -164,7 +165,7 @@ async def async_get_fkfdata(self):
164165
_LOGGER.debug("greencolor parameter not set for " + self._publicplace)
165166

166167
if self._green and self._zipcode != ZIPCODE_BUDAORS:
167-
url = 'https://www.fkf.hu/kerti-zoldhulladek-korzetek-' + _getRomanDistrictFromZip(self._zipcode) + '-kerulet'
168+
url = 'https://' + URL + '/kerti-zoldhulladek-korzetek-' + _getRomanDistrictFromZip(self._zipcode) + '-kerulet'
168169
for i in range(MAX_RETRIES):
169170
try:
170171
async with _session.get(url, timeout=HTTP_TIMEOUT) as response:
@@ -215,22 +216,22 @@ async def async_get_fkfdata(self):
215216
if self._next_green_days == None:
216217
self._next_green_days = green_day_diff
217218

218-
url = 'https://www.fkf.hu/'
219+
url = 'https://' + URL + '/'
219220
try:
220221
async with _session.get(url, timeout=HTTP_TIMEOUT) as response:
221222
r = await response.text()
222223
cookie = response.headers['Set-Cookie']
223224
except (aiohttp.ContentTypeError, aiohttp.ServerDisconnectedError, asyncio.TimeoutError):
224-
_LOGGER.debug("Connection error to fkf.hu")
225+
_LOGGER.debug("Connection error to " + URL)
225226

226227
if self._zipcode == ZIPCODE_BUDAORS:
227-
url = 'https://www.fkf.hu/hulladeknaptar-budaors'
228+
url = 'https://' + URL + '/hulladeknaptar-budaors'
228229
payload_val = [self._publicplace]
229230
payload_key = ["publicPlace"]
230231
october_par = ["ajax/budaorsResults"]
231232
october_hnd = ["onSearch"]
232233
else:
233-
url = 'https://www.fkf.hu/hulladeknaptar'
234+
url = 'https://' + URL + '/hulladeknaptar'
234235
payload_val = [self._zipcode, self._publicplace, self._housenr]
235236
payload_key = ["district","publicPlace","houseNumber"]
236237
october_par = ["ajax/publicPlaces","ajax/houseNumbers","ajax/calSearchResults"]

info.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
# FKF Budapest Garbage Collection custom component for Home Assistant
66

7-
This custom component provides garbage collection schedule from FKF Budapest Department of Public
8-
for a configurable address. It also supports green garbage collection schedule (FKF Budapest treats
7+
This custom component provides garbage collection schedule from MOHU Budapest Department of Public
8+
for a configurable address. It also supports green garbage collection schedule (MOHU Budapest treats
99
it differently)
1010

1111
The state of the sensor will be the number of days to the first upcoming garbage collection date.
1212

1313
The sensor will also report in an attribute the status of the latest data fetch.
1414

15-
The FKF Garbage Collection sensors can also be added to appear in HASS calendar. Calendar entries will be prefixed
15+
The MOHU Budapest Garbage Collection sensors can also be added to appear in HASS calendar. Calendar entries will be prefixed
1616
with the friendly name of the sensor to support and distinguish schedule for multiple such sensors/addresses. Translation of
1717
the calendar entries is also available through the calendar_lang option; so far only Hungarian and English are supported.
1818
Language tags should follow [IANA subtag registry](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry).
@@ -24,8 +24,8 @@ search for <i>FKF Budapest Garbage</i> in the Integrations.<br />
2424
Sensors of this platform should be configured as per below information.
2525

2626
#### Configuration:
27-
Define sensors with the following configuration parameters according to [FKF Hulladéknaptár](https://www.fkf.hu/hulladeknaptar/)
28-
for Budapest or [FKF Hulladéknaptár](https://www.fkf.hu/hulladeknaptar-budaors) for Budaörs.<br />
27+
Define sensors with the following configuration parameters according to [MOHU Budapest Hulladéknaptár](https://mohubudapest.hu/hulladeknaptar/)
28+
for Budapest or [MOHU Budapest Hulladéknaptár](https://mohubudapest.hu/hulladeknaptar-budaors) for Budaörs.<br />
2929

3030
---
3131
| Name | Optional | `Default` | Description |
@@ -36,15 +36,15 @@ for Budapest or [FKF Hulladéknaptár](https://www.fkf.hu/hulladeknaptar-budaors
3636
| publicplace | **N** | - | Name of public place |
3737
| housenr | **Y** | `1` | House number (only for Budapest) |
3838
| offsetdays | **Y** | `0` | Optional offset for the number of days left (usually 1) |
39-
| calendar | **Y** | `false` | Show FKF schedule in calendar |
39+
| calendar | **Y** | `false` | Show MOHU Budapest schedule in calendar |
4040
| calendar_lang | **Y** | `en` | Language to display garbage type in calendar |
4141
| green | **Y** | `false` | Include green garbage schedule as well |
4242
| greencolor | **Y** | `` | Use map color for districts that have different green garbage collecting days per region (see below) |
4343
---
4444

45-
For green garbage collection, `greencolor`, if defined, takes precedence over `publicplace`-`housenr`. Color name can be fetched from the source of the webpage `www.fkf.hu/kerti-zoldhulladek-korzetek-<districts_roman_number>-kerulet` and is one of these: `kek`, `lila`, `narancs`, `rozsaszin`, `sarga`. `greencolor` is not necessary if the whole district has green garbage collection on one specific day. `greencolor` has to be defined for Budapest districts.
45+
For green garbage collection, `greencolor`, if defined, takes precedence over `publicplace`-`housenr`. Color name can be fetched from the source of the webpage `mohubudapest.hu/kerti-zoldhulladek-korzetek-<districts_roman_number>-kerulet` and is one of these: `kek`, `lila`, `narancs`, `rozsaszin`, `sarga`. `greencolor` is not necessary if the whole district has green garbage collection on one specific day. `greencolor` has to be defined for Budapest districts.
4646

47-
Green garbage collection related attribute will not be included when the green garbage collection service is suspended during winter time ([FKF Zöldhulladék](https://www.fkf.hu/kerti-zoldhulladek-gyujtes)).
47+
Green garbage collection related attribute will not be included when the green garbage collection service is suspended during winter time ([MOHU Budapest Zöldhulladék](https://mohubudapest.hu/kerti-zoldhulladek-gyujtes)).
4848

4949
#### Example
5050
```

tracker.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"fkf-garbage-collection": {
3-
"version": "0.8.3",
4-
"updated_at": "2024-03-25",
3+
"version": "0.9.0",
4+
"updated_at": "2025-01-16",
55
"visit_repo": "https://github.com/amaximus/fkf-garbage-collection",
6-
"changelog": "https://github.com/amaximus/fkf-garbage-collection/releases/0.8.3"
6+
"changelog": "https://github.com/amaximus/fkf-garbage-collection/releases/0.9.0"
77
}
88
}

0 commit comments

Comments
 (0)