Skip to content

Commit cadfe84

Browse files
authored
Merge pull request #209 from briis/v2.2.2
Release V2.2.2
2 parents 61b242e + 2926554 commit cadfe84

File tree

5 files changed

+27
-13
lines changed

5 files changed

+27
-13
lines changed

.devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ludeeus/integration_blueprint",
3-
"image": "mcr.microsoft.com/devcontainers/python:3.12-bookworm",
3+
"image": "mcr.microsoft.com/devcontainers/python:3.13-bookworm",
44
"postCreateCommand": "scripts/setup",
55
"forwardPorts": [
66
8123

CHANGELOG.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
# Changelog for Affaldshåndtering DK Home Assistant Integration
22

3-
## Version 2.2.1
3+
## Version 2.2.2
44

5-
**Date**: `2024-12-09`
5+
**Date**: `2024-01-07`
66

77
## What's Changed
88

9-
* Fixing renamed containers in Egedal kommune. Closing [AffaldDK #194](https://github.com/briis/affalddk/issues/194)
10-
* Bump `pyaffalddk` to V2.1.2
9+
* Changed the Last Update field as this causes blocking IO issues with Home Assistant. Now this value is calculated based on homeassistant dt functions.
10+
* Fixing missing DAYLIGHT information in iCal data. Closing [AffaldDK #205](https://github.com/briis/affalddk/issues/205)
11+
* Fixing missing containers in Køge after renaming. Closing [AffaldDK #207](https://github.com/briis/affalddk/issues/207)
12+
* Bump development environment to Python 3.1.3 and Home Assistant 2025.1
13+
* Bump `pyaffalddk` to V2.1.6
1114

1215
## [Dependabot](https://github.com/apps/dependabot) updates
1316

@@ -16,6 +19,15 @@
1619
<details>
1720
<summary><b>PREVIOUS CHANGES</b></summary>
1821

22+
## Version 2.2.1
23+
24+
**Date**: `2024-12-09`
25+
26+
## What's Changed
27+
28+
* Fixing renamed containers in Egedal kommune. Closing [AffaldDK #194](https://github.com/briis/affalddk/issues/194)
29+
* Bump `pyaffalddk` to V2.1.2
30+
1931
## Version 2.2.0
2032

2133
**Date**: `2024-11-26`

custom_components/affalddk/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Support for the Affald DK Garbage Collection Service."""
2+
23
from __future__ import annotations
34

45
from datetime import timedelta
@@ -112,7 +113,7 @@ def __init__(self, hass: HomeAssistant, config: MappingProxyType[str, Any]) -> N
112113
self.hass = hass
113114
self._config = config
114115
self.affalddk_data: GarbageCollection
115-
self.pickup_events: PickupEvents = []
116+
self.pickup_events: PickupEvents
116117

117118
def initialize_data(self) -> bool:
118119
"""Establish connection to API."""
@@ -132,10 +133,10 @@ async def fetch_data(self) -> Self:
132133
)
133134
except AffaldDKNotSupportedError as err:
134135
_LOGGER.debug(err)
135-
return False
136+
raise CannotConnect() from err
136137
except AffaldDKNotValidAddressError as err:
137138
_LOGGER.debug(err)
138-
return False
139+
raise CannotConnect() from err
139140
except AffaldDKNoConnection as notreadyerror:
140141
_LOGGER.debug(notreadyerror)
141142
raise ConfigEntryNotReady from notreadyerror

custom_components/affalddk/manifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"iot_class": "cloud_polling",
1313
"issue_tracker": "https://github.com/briis/affalddk/issues",
1414
"requirements": [
15-
"pyaffalddk==2.1.2"
15+
"pyaffalddk==2.1.6"
1616
],
17-
"version": "2.2.1"
17+
"version": "2.2.2"
1818
}

custom_components/affalddk/sensor.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Support for AffaldDK sensor data."""
2+
23
from __future__ import annotations
34

45
import logging
@@ -23,7 +24,7 @@
2324
CoordinatorEntity,
2425
DataUpdateCoordinator,
2526
)
26-
from homeassistant.util.dt import now, as_local
27+
from homeassistant.util.dt import now
2728

2829
from . import AffaldDKtDataUpdateCoordinator
2930
from .const import (
@@ -44,7 +45,7 @@
4445
from pyaffalddk import ICON_LIST, PickupType, WEEKDAYS, WEEKDAYS_SHORT
4546

4647

47-
@dataclass
48+
@dataclass(frozen=True)
4849
class AffaldDKSensorEntityDescription(SensorEntityDescription):
4950
"""Describes AffaldDK sensor entity."""
5051

@@ -369,7 +370,7 @@ def extra_state_attributes(self) -> None:
369370
ATTR_DESCRIPTION: self._pickup_events.description,
370371
ATTR_DURATION: _day_text,
371372
ATTR_ENTITY_PICTURE: PICTURE_ITEMS.get(_categori),
372-
ATTR_LAST_UPDATE: as_local(self._pickup_events.last_updated),
373+
ATTR_LAST_UPDATE: now().isoformat(),
373374
ATTR_NAME: self._pickup_events.friendly_name,
374375
}
375376

0 commit comments

Comments
 (0)