Skip to content

Commit

Permalink
debug last message received
Browse files Browse the repository at this point in the history
  • Loading branch information
grimmpp committed Feb 13, 2024
1 parent c7bbbf8 commit 8892898
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions custom_components/eltako/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ async def async_added_to_hass(self) -> None:
if is_value_available is None:
latest_state:State = await self.async_get_last_state()
if latest_state is not None:
await self.async_load_value_initially(latest_state)
self.load_value_initially(latest_state)


async def async_load_value_initially(self, latest_state:State):
def load_value_initially(self, latest_state:State):
# cast state:str to actual value
attributs = latest_state.attributes
LOGGER.debug(f"[device] eneity unique_id: {self.unique_id}")
Expand Down Expand Up @@ -144,7 +144,7 @@ async def async_load_value_initially(self, latest_state:State):
elif hasattr(self, '_attr_native_value'):
LOGGER.debug(f"[device] latest state - set {self._attr_native_value}")

await self.async_schedule_update_ha_state(force_refresh=True)
self.schedule_update_ha_state(force_refresh=True)


def validate_dev_id(self) -> bool:
Expand Down

0 comments on commit 8892898

Please sign in to comment.