Skip to main content

Alarm control panel entity

An alarm control panel entity controls an alarm. Derive a platform entity from homeassistant.components.alarm_control_panel.AlarmControlPanelEntity.

Properties

tip

Properties should always only return information from memory and not do I/O (like network requests). Implement update() or async_update() to fetch data.

NameTypeDefaultDescription
alarm_stateAlarmControlPanelState | NoneRequiredOne of the alarm values listed in the states.
code_arm_requiredboolTrueWhether the code is required for arm actions.
code_formatCodeFormat | NoneNoneOne of the states listed in the code formats section.
changed_bystr | NoneNoneLast change triggered by.

States

Setting the state should return an enum from AlarmControlPanelState in the alarm_state property.

ValueDescription
DISARMEDThe alarm is disarmed (off).
ARMED_HOMEThe alarm is armed in home mode.
ARMED_AWAYThe alarm is armed in away mode.
ARMED_NIGHTThe alarm is armed in night mode.
ARMED_VACATIONThe alarm is armed in vacation mode.
ARMED_CUSTOM_BYPASS The alarm is armed in bypass mode.
PENDINGThe alarm is pending (towards triggered).
ARMINGThe alarm is arming.
DISARMINGThe alarm is disarming.
TRIGGEREDThe alarm is triggered.

Supported features

Supported features are defined by using values in the AlarmControlPanelEntityFeature enum and are combined using the bitwise or (|) operator.

ConstantDescription
AlarmControlPanelEntityFeature.ARM_AWAYThe alarm supports arming in away mode.
AlarmControlPanelEntityFeature.ARM_CUSTOM_BYPASSThe alarm supports arming with a bypass.
AlarmControlPanelEntityFeature.ARM_HOMEThe alarm supports arming in home mode.
AlarmControlPanelEntityFeature.ARM_NIGHTThe alarm supports arming in night mode.
AlarmControlPanelEntityFeature.ARM_VACATIONThe alarm supports arming in vacation mode.
AlarmControlPanelEntityFeature.TRIGGERThe alarm can be triggered remotely.

Code formats

Supported code formats are defined by using values in the CodeFormat enum.

ValueDescription
NoneNo code required.
CodeFormat.NUMBERCode is a number (Shows ten-key pad on frontend).
CodeFormat.TEXTCode is a string.

Methods

Alarm Disarm

Send disarm command.

class MyAlarm(AlarmControlPanelEntity):
# Implement one of these methods.

def alarm_disarm(self, code=None) -> None:
"""Send disarm command."""

async def async_alarm_disarm(self, code=None) -> None:
"""Send disarm command."""

Alarm arm home

Send arm home command.

class MyAlarm(AlarmControlPanelEntity):
# Implement one of these methods.

def alarm_arm_home(self, code=None) -> None:
"""Send arm home command."""

async def async_alarm_arm_home(self, code=None) -> None:
"""Send arm home command."""

Alarm arm away

Send arm away command.

class MyAlarm(AlarmControlPanelEntity):
# Implement one of these methods.

def alarm_arm_away(self, code=None) -> None:
"""Send arm away command."""

async def async_alarm_arm_away(self, code=None) -> None:
"""Send arm away command."""

Alarm arm night

Send arm night command.

class MyAlarm(AlarmControlPanelEntity):
# Implement one of these methods.

def alarm_arm_night(self, code=None) -> None:
"""Send arm night command."""

async def async_alarm_arm_night(self, code=None) -> None:
"""Send arm night command."""

Alarm arm vacation

Send arm vacation command.

class MyAlarm(AlarmControlPanelEntity):
# Implement one of these methods.

def alarm_arm_vacation(self, code=None) -> None:
"""Send arm vacation command."""

async def async_alarm_arm_vacation(self, code=None) -> None:
"""Send arm vacation command."""

Alarm trigger

Send alarm trigger command.

class MyAlarm(AlarmControlPanelEntity):
# Implement one of these methods.

def alarm_trigger(self, code=None) -> None:
"""Send alarm trigger command."""

async def async_alarm_trigger(self, code=None) -> None:
"""Send alarm trigger command."""

Alarm custom bypass

Send arm custom bypass command.

class MyAlarm(AlarmControlPanelEntity):
# Implement one of these methods.

def alarm_arm_custom_bypass(self, code=None) -> None:
"""Send arm custom bypass command."""

async def async_alarm_arm_custom_bypass(self, code=None) -> None:
"""Send arm custom bypass command."""