Skip to content

Commit

Permalink
Merge pull request #12 from briis/version-2.0.1
Browse files Browse the repository at this point in the history
Version 2.0.1
  • Loading branch information
briis authored Mar 7, 2024
2 parents 5d00aa8 + 391bb6d commit b30c7f2
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 7 deletions.
19 changes: 18 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,28 @@
# Changelog for Affaldshåndtering DK Home Assistant Integration

## Version 2.0.0
## Version 2.0.1

**Date**: `2024-03-xx`

## What's Changed

- Fixing wrong Issue Link address. Closing [#10](https://github.com/briis/affalddk/issues/10)
- Bump pyrenoweb to 2.0.5 Closing wrong types of garbage types in Egedal and Allerød [#6](https://github.com/briis/affalddk/issues/6)
- Handling the case where the same Road exists more than once in a Municipality. There is now a requirement to enter the Zipcode of the Address when setting up a new entity in Home Assistant. Closing Issue [#5](https://github.com/briis/affalddk/issues/5)
- Fixing missing containers in Aalborg. Closing [#11](https://github.com/briis/affalddk/issues/11)
- Added Rudersdal back to the list as they do work with this Integration. Closing [#8](https://github.com/briis/affalddk/issues/8)
- Bump dependency `pyrenoweb` to 2.0.6

---------------------------

<details>
<summary><b>VERSION 2.0.0</b></summary>

**Date**: `2024-03-04`

## What's Changed
* Even though it says V2.0.0, this is the first release of this Integration. Please see the [README.md](https://github.com/briis/affalddk/blob/main/README.md) for a descriptin and installation instructions.
</details>

---------------------------
<details>
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ So why change the name and not just give it a new version number?
For a long time I wanted to have this Integration part of the Default HACS store, but in order to do that, you need to have Logo and icon images in the Home Assistant Brand Database. As Renoweb does not really have a logo by itself, I could not create one, as this could violate their rights to the name. But calling it something that is not related directly to Renoweb, gives me the possibility to invent my own logo and thus getting this added to the Default HACS store.

### DESCRIPTION
Municipalities in Denmark, do not have one standard for how to expose the Pickup Calendars for their citizens, and different Municipalities have different solutions. This integration currently supports the Municipalities that uses the solution from **Renoweb** and that accounts for close to 50% of all Municipalities. Go to the [Municipality List](#MUNICIPALITIES) to see if your Municipality will work with this integration.
Municipalities in Denmark, do not have one standard for how to expose the Pickup Calendars for their citizens, and different Municipalities have different solutions. This integration currently supports the Municipalities that uses the solution from **Renoweb** and that accounts for more than 50% of all Municipalities. Go to the [Municipality List](#MUNICIPALITIES) to see if your Municipality will work with this integration.

The biggest issue is, that there is NO standard for the way municipalities mix the content of containers. Some have glas & metal in one container, others have glas and paper in one container, etc and also even though they do mix the same content in a container, they do not name it the same. In order to have some structure I need them grouped together and this is a bit of a challenge with all these different types. If a new pickup-type is found, the system will log a warning, which you can put in an issue and I will add it to the list. Please enable logging for the wrapper module in Home assistant to get this warning in Home Assistant, by adding this code to your `configuration.yaml`:

Expand Down Expand Up @@ -100,6 +100,7 @@ To add Affald-DK to your installation, do the following:
| Parameter | Required | Default Value | Description |
| --------- | -------- | ------------- | ----------- |
| `Municipality` | Yes | None | Select your Municipality from the Dropdown list. You can press the first letter of your municipality to quickly scroll down. |
| `Zipcode` | Yes | None | Enter the Zipcode of the address. This is required as some municipalities use the same road name in several cities, so we need to make sure we pick the right street. |
| `Road name` | Yes | None | Type the name of the road you want to get collection data for. Without house number. |
| `House Number` | Yes | None | The house number of the address. Also accepts letters. If you have a house number like 2A or similar, and it does not work, try putting a space between the number and the letter, like 2 A |

Expand Down Expand Up @@ -154,6 +155,7 @@ Here is the list of currently supported Municipalities
- Ringkøbing-Skjern
- Ringsted
- Roskilde
- Rudersdal
- Rødovre
- Samsø
- Slagelse
Expand Down
4 changes: 3 additions & 1 deletion custom_components/affalddk/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
CONF_MUNICIPALITY,
CONF_ROAD_NAME,
CONF_UPDATE_INTERVAL,
CONF_ZIPCODE,
DEFAULT_SCAN_INTERVAL,
DOMAIN,
)
Expand Down Expand Up @@ -54,7 +55,7 @@ async def async_step_user(self, user_input: dict[str, Any] | None = None) -> Flo
try:
renoweb = GarbageCollection(municipality=user_input[CONF_MUNICIPALITY], session=session)
await renoweb.async_init()
address_info: RenoWebAddressInfo = await renoweb.get_address_id(street=user_input[CONF_ROAD_NAME], house_number=user_input[CONF_HOUSE_NUMBER])
address_info: RenoWebAddressInfo = await renoweb.get_address_id(zipcode=user_input[CONF_ZIPCODE],street=user_input[CONF_ROAD_NAME], house_number=user_input[CONF_HOUSE_NUMBER])
except RenowWebNotSupportedError:
errors["base"] = "municipality_not_supported"
return await self._show_setup_form(errors)
Expand Down Expand Up @@ -85,6 +86,7 @@ async def _show_setup_form(self, errors=None):
data_schema=vol.Schema(
{
vol.Required(CONF_MUNICIPALITY):selector({"select": {"options": MUNICIPALITIES_ARRAY}}),
vol.Required(CONF_ZIPCODE): str,
vol.Required(CONF_ROAD_NAME): str,
vol.Required(CONF_HOUSE_NUMBER): str,
}
Expand Down
3 changes: 2 additions & 1 deletion custom_components/affalddk/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
CONF_MUNICIPALITY = "municipality"
CONF_ROAD_NAME = "road_name"
CONF_UPDATE_INTERVAL = "update_interval"
CONF_ZIPCODE = "zipcode"

DEFAULT_ATTRIBUTION = "Data delivered by Renoweb"
DEFAULT_BRAND = "Affald DK"
DEFAULT_BRAND = "@BRiis"
DEFAULT_API_VERSION = "Legacy"
DEFAULT_SCAN_INTERVAL = 6
DOMAIN = "affalddk"
Expand Down
6 changes: 3 additions & 3 deletions custom_components/affalddk/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"config_flow": true,
"documentation": "https://github.com/briis/affalddk",
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/briis/affald/issues",
"issue_tracker": "https://github.com/briis/affalddk/issues",
"requirements": [
"pyrenoweb==2.0.4"
"pyrenoweb==2.0.6"
],
"version": "2.0.0-beta3"
"version": "2.0.1"
}
2 changes: 2 additions & 0 deletions custom_components/affalddk/translations/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"user": {
"data": {
"municipality": "Vælg Kommune",
"zipcode": "Postnummer",
"road_name": "Vej navn",
"house_number": "Hus nummer",
"update_interval": "Opdaterings interval (timer)"
Expand All @@ -25,6 +26,7 @@
"init": {
"data": {
"municipality": "Vælg Kommune",
"zipcode": "Postnummer",
"road_name": "Vej navn",
"house_number": "Hus nummer",
"update_interval": "Opdaterings interval (timer)"
Expand Down
2 changes: 2 additions & 0 deletions custom_components/affalddk/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"user": {
"data": {
"municipality": "Select Municipality",
"zipcode": "Zipcode",
"road_name": "Road name",
"house_number": "House Number",
"update_interval": "Update Interval (Hours)"
Expand All @@ -25,6 +26,7 @@
"init": {
"data": {
"municipality": "Select Municipality",
"zipcode": "Zipcode",
"road_name": "Road name",
"house_number": "House Number",
"update_interval": "Update Interval (Hours)"
Expand Down

0 comments on commit b30c7f2

Please sign in to comment.