Skip to content

Commit 68db9c1

Browse files
committed
Fix for BenPru#473
1 parent a8af471 commit 68db9c1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

custom_components/luxtronik/coordinator.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,12 @@ async def _async_update_data(self) -> LuxtronikCoordinatorData:
100100
try:
101101
await self.hass.async_add_executor_job(self.client.read)
102102
LOGGER.debug("_async_update_data")
103-
return LuxtronikCoordinatorData(
103+
self.data = LuxtronikCoordinatorData(
104104
parameters=self.client.parameters,
105105
calculations=self.client.calculations,
106106
visibilities=self.client.visibilities,
107107
)
108+
return self.data
108109
except Exception as err:
109110
raise UpdateFailed(f"Error fetching data: {err}") from err
110111

@@ -508,7 +509,8 @@ def __init__(self, host: str, port: int, original: Exception):
508509

509510

510511
async def connect_and_get_coordinator(
511-
hass: HomeAssistant, config: dict[str, Any]
512+
hass: HomeAssistant,
513+
config: dict[str, Any]
512514
) -> LuxtronikCoordinator:
513515
"""Try to connect to a Luxtronik device and return coordinator."""
514516

0 commit comments

Comments
 (0)