Skip to content

Commit

Permalink
fix: all toggle entity should define is on attr
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlb committed May 15, 2024
1 parent 2835be2 commit dd49b10
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions custom_components/ha_hatch/riot_clock_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 1 addition & 0 deletions custom_components/ha_hatch/scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit dd49b10

Please sign in to comment.