Use shorthand attributes in Isy994 (#99395)
This commit is contained in:
parent
5e03954e69
commit
2dab9eaf86
3 changed files with 6 additions and 35 deletions
|
@ -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."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue