Skip to content

Commit 0f63d3f

Browse files
Øyvind Matheson WergelandØyvind Matheson Wergeland
authored andcommitted
Version 0.0.4
- Fix available - Set sensor values during initialisation
1 parent cc88681 commit 0f63d3f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

custom_components/connectlife/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
"requirements": ["connectlife==0.0.3"],
1313
"ssdp": [],
1414
"zeroconf": [],
15-
"version": "0.0.3"
15+
"version": "0.0.4"
1616
}

custom_components/connectlife/sensor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@ def __init__(self, coordinator: ConnectLifeCoordinator, appliance: ConnectLifeAp
4444
description = status.replace("_", " ")
4545
self._attr_name = f"{appliance._device_nickname} {description}"
4646
self._attr_unique_id = f"{appliance.device_id}-{status}"
47+
self._handle_coordinator_update()
4748

4849
@callback
4950
def _handle_coordinator_update(self) -> None:
5051
"""Handle updated data from the coordinator."""
5152
self._attr_native_value = self.coordinator.appliances[self.device_id].status_list[self.status]
52-
self._attr_available = self.coordinator.appliances[self.device_id].offline_state == 1
53+
self._attr_available = self.coordinator.appliances[self.device_id]._offline_state == 1

0 commit comments

Comments
 (0)