diff --git a/custom_components/ha_hatch/riot_clock_entity.py b/custom_components/ha_hatch/riot_clock_entity.py index 39461ba..d4bc2c8 100644 --- a/custom_components/ha_hatch/riot_clock_entity.py +++ b/custom_components/ha_hatch/riot_clock_entity.py @@ -25,8 +25,7 @@ def _update_local_state(self): if self.platform is None: return _LOGGER.debug(f"updating state:{self.rest_device}") - if isinstance(self.rest_device, RestIot): - self._attr_is_on = self.rest_device.is_clock_on + self._attr_is_on = self.rest_device.is_clock_on clock_val = self.rest_device.clock or 0.0 self._attr_brightness = round(clock_val / 100 * 255.0, 0) self.schedule_update_ha_state() diff --git a/custom_components/ha_hatch/scene.py b/custom_components/ha_hatch/scene.py index 79b7a47..c7ce301 100755 --- a/custom_components/ha_hatch/scene.py +++ b/custom_components/ha_hatch/scene.py @@ -33,6 +33,7 @@ def __init__(self, rest_device: RestIot, name: str, favorite_id: int): self.favorite_name_id = f"{name}-{favorite_id}" def activate(self, **kwargs: Any) -> None: + _LOGGER.debug(f"activating scene:{self.unique_id}") self.rest_device.set_favorite(self.favorite_name_id) def _update_local_state(self):