Skip to content

Commit e03ef3b

Browse files
authored
Add is_on property to siren (#63)
1 parent 378e536 commit e03ef3b

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

zha/application/platforms/siren.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,14 @@ def info_object(self) -> SirenEntityInfo:
113113
def state(self) -> dict[str, Any]:
114114
"""Get the state of the siren."""
115115
response = super().state
116-
response["state"] = self._attr_is_on
116+
response["state"] = self.is_on
117117
return response
118118

119+
@property
120+
def is_on(self) -> bool:
121+
"""Return true if the entity is on."""
122+
return self._attr_is_on
123+
119124
async def async_turn_on(self, **kwargs: Any) -> None:
120125
"""Turn on siren."""
121126
if self._off_listener:

0 commit comments

Comments
 (0)