Use shorthand attributes in Isy994 (#99395)

This commit is contained in:
Joost Lekkerkerker 2023-09-01 02:58:40 +02:00 committed by GitHub
parent 5e03954e69
commit 2dab9eaf86
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 35 deletions

View file

@ -112,6 +112,8 @@ class ISYSwitchEntity(ISYNodeEntity, SwitchEntity):
class ISYSwitchProgramEntity(ISYProgramEntity, SwitchEntity):
"""A representation of an ISY program switch."""
_attr_icon = "mdi:script-text-outline" # Matches isy program icon
@property
def is_on(self) -> bool:
"""Get whether the ISY switch program is on."""
@ -131,11 +133,6 @@ class ISYSwitchProgramEntity(ISYProgramEntity, SwitchEntity):
f"Unable to run 'else' clause on program switch {self._actions.address}"
)
@property
def icon(self) -> str:
"""Get the icon for programs."""
return "mdi:script-text-outline" # Matches isy program icon
class ISYEnableSwitchEntity(ISYAuxControlEntity, SwitchEntity):
"""A representation of an ISY enable/disable switch."""