44
55from typing import Any , TypeAlias , cast
66
7- from homeassistant .const import STATE_OFF , STATE_ON
87from homeassistant .core import callback
98from homeassistant .exceptions import HomeAssistantError
109from homeassistant .helpers .entity import DeviceInfo , Entity , EntityDescription
@@ -81,7 +80,7 @@ class ISYGroupEntity(ISYEntity):
8180 @property
8281 def extra_state_attributes (self ) -> dict :
8382 """Get the state attributes for the device."""
84- return {"group_all_on" : STATE_ON if self ._node .group_all_on else STATE_OFF }
83+ return {"group_all_on" : self ._node .group_all_on }
8584
8685
8786class ISYNodeEntity (ISYEntity ):
@@ -222,7 +221,7 @@ def extra_state_attributes(self) -> dict:
222221 attr = {}
223222 if self ._actions :
224223 actions_detail = cast (ProgramDetail , self ._actions .detail )
225- attr ["actions_enabled" ] = str ( self ._actions .enabled )
224+ attr ["actions_enabled" ] = self ._actions .enabled
226225 if actions_detail .last_finish_time is not None :
227226 attr ["actions_last_finished" ] = str (
228227 as_local (actions_detail .last_finish_time )
@@ -231,10 +230,10 @@ def extra_state_attributes(self) -> dict:
231230 attr ["actions_last_run" ] = str (as_local (actions_detail .last_run_time ))
232231 if self ._actions .last_update is not None :
233232 attr ["actions_last_update" ] = str (as_local (self ._actions .last_update ))
234- attr ["run_at_startup" ] = str ( actions_detail .run_at_startup )
235- attr ["running" ] = str ( actions_detail .running )
233+ attr ["run_at_startup" ] = actions_detail .run_at_startup
234+ attr ["running" ] = actions_detail .running
236235
237- attr ["status_enabled" ] = str ( self ._node .enabled )
236+ attr ["status_enabled" ] = self ._node .enabled
238237 detail = cast (ProgramDetail , self ._node .detail )
239238 if detail .last_finish_time is not None :
240239 attr ["status_last_finished" ] = str (as_local (detail .last_finish_time ))
0 commit comments