Skip to content

Commit

Permalink
Add is_on property to siren (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheJulianJES authored Jul 7, 2024
1 parent 378e536 commit e03ef3b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion zha/application/platforms/siren.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,14 @@ def info_object(self) -> SirenEntityInfo:
def state(self) -> dict[str, Any]:
"""Get the state of the siren."""
response = super().state
response["state"] = self._attr_is_on
response["state"] = self.is_on
return response

@property
def is_on(self) -> bool:
"""Return true if the entity is on."""
return self._attr_is_on

async def async_turn_on(self, **kwargs: Any) -> None:
"""Turn on siren."""
if self._off_listener:
Expand Down

0 comments on commit e03ef3b

Please sign in to comment.