mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 16:57:10 +00:00
Use attributes in lupusec alarm (#74109)
This commit is contained in:
parent
45cdfa1049
commit
389664e37c
@ -19,8 +19,6 @@ from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
|||||||
|
|
||||||
from . import DOMAIN as LUPUSEC_DOMAIN, LupusecDevice
|
from . import DOMAIN as LUPUSEC_DOMAIN, LupusecDevice
|
||||||
|
|
||||||
ICON = "mdi:security"
|
|
||||||
|
|
||||||
SCAN_INTERVAL = timedelta(seconds=2)
|
SCAN_INTERVAL = timedelta(seconds=2)
|
||||||
|
|
||||||
|
|
||||||
@ -44,18 +42,14 @@ def setup_platform(
|
|||||||
class LupusecAlarm(LupusecDevice, AlarmControlPanelEntity):
|
class LupusecAlarm(LupusecDevice, AlarmControlPanelEntity):
|
||||||
"""An alarm_control_panel implementation for Lupusec."""
|
"""An alarm_control_panel implementation for Lupusec."""
|
||||||
|
|
||||||
|
_attr_icon = "mdi:security"
|
||||||
_attr_supported_features = (
|
_attr_supported_features = (
|
||||||
AlarmControlPanelEntityFeature.ARM_HOME
|
AlarmControlPanelEntityFeature.ARM_HOME
|
||||||
| AlarmControlPanelEntityFeature.ARM_AWAY
|
| AlarmControlPanelEntityFeature.ARM_AWAY
|
||||||
)
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def icon(self):
|
def state(self) -> str | None:
|
||||||
"""Return the icon."""
|
|
||||||
return ICON
|
|
||||||
|
|
||||||
@property
|
|
||||||
def state(self):
|
|
||||||
"""Return the state of the device."""
|
"""Return the state of the device."""
|
||||||
if self._device.is_standby:
|
if self._device.is_standby:
|
||||||
state = STATE_ALARM_DISARMED
|
state = STATE_ALARM_DISARMED
|
||||||
|
Loading…
x
Reference in New Issue
Block a user