|
ESPHome 2025.12.0-dev
|
#include <alarm_control_panel.h>
Public Member Functions | |
| AlarmControlPanelCall | make_call () |
| Make a AlarmControlPanelCall. | |
| void | publish_state (AlarmControlPanelState state) |
| Set the state of the alarm_control_panel. | |
| void | add_on_state_callback (std::function< void()> &&callback) |
| Add a callback for when the state of the alarm_control_panel changes. | |
| void | add_on_triggered_callback (std::function< void()> &&callback) |
| Add a callback for when the state of the alarm_control_panel chanes to triggered. | |
| void | add_on_arming_callback (std::function< void()> &&callback) |
| Add a callback for when the state of the alarm_control_panel chanes to arming. | |
| void | add_on_pending_callback (std::function< void()> &&callback) |
| Add a callback for when the state of the alarm_control_panel changes to pending. | |
| void | add_on_armed_home_callback (std::function< void()> &&callback) |
| Add a callback for when the state of the alarm_control_panel changes to armed_home. | |
| void | add_on_armed_night_callback (std::function< void()> &&callback) |
| Add a callback for when the state of the alarm_control_panel changes to armed_night. | |
| void | add_on_armed_away_callback (std::function< void()> &&callback) |
| Add a callback for when the state of the alarm_control_panel changes to armed_away. | |
| void | add_on_disarmed_callback (std::function< void()> &&callback) |
| Add a callback for when the state of the alarm_control_panel changes to disarmed. | |
| void | add_on_cleared_callback (std::function< void()> &&callback) |
| Add a callback for when the state of the alarm_control_panel clears from triggered. | |
| void | add_on_chime_callback (std::function< void()> &&callback) |
| Add a callback for when a chime zone goes from closed to open. | |
| void | add_on_ready_callback (std::function< void()> &&callback) |
| Add a callback for when a ready state changes. | |
| virtual uint32_t | get_supported_features () const =0 |
| A numeric representation of the supported features as per HomeAssistant. | |
| virtual bool | get_requires_code () const =0 |
| Returns if the alarm_control_panel has a code. | |
| virtual bool | get_requires_code_to_arm () const =0 |
| Returns if the alarm_control_panel requires a code to arm. | |
| void | arm_away (optional< std::string > code=nullopt) |
| arm the alarm in away mode | |
| void | arm_home (optional< std::string > code=nullopt) |
| arm the alarm in home mode | |
| void | arm_night (optional< std::string > code=nullopt) |
| arm the alarm in night mode | |
| void | arm_vacation (optional< std::string > code=nullopt) |
| arm the alarm in vacation mode | |
| void | arm_custom_bypass (optional< std::string > code=nullopt) |
| arm the alarm in custom bypass mode | |
| void | disarm (optional< std::string > code=nullopt) |
| disarm the alarm | |
| AlarmControlPanelState | get_state () const |
| Get the state. | |
| bool | is_state_armed (AlarmControlPanelState state) |
Public Member Functions inherited from esphome::EntityBase | |
| const StringRef & | get_name () const |
| void | set_name (const char *name) |
| bool | has_own_name () const |
| std::string | get_object_id () const |
| void | set_object_id (const char *object_id) |
| uint32_t | get_object_id_hash () |
| bool | is_internal () const |
| void | set_internal (bool internal) |
| bool | is_disabled_by_default () const |
| void | set_disabled_by_default (bool disabled_by_default) |
| EntityCategory | get_entity_category () const |
| void | set_entity_category (EntityCategory entity_category) |
| ESPDEPRECATED("Use get_icon_ref() instead for better performance (avoids string copy). Will be removed in ESPHome 2026.5.0", "2025.11.0") std void | set_icon (const char *icon) |
| StringRef | get_icon_ref () const |
| uint32_t | get_device_id () const |
| void | set_device (Device *device) |
| bool | has_state () const |
| void | set_has_state (bool state) |
| uint32_t | get_preference_hash () |
| Get a unique hash for storing preferences/settings for this entity. | |
Protected Member Functions | |
| virtual void | control (const AlarmControlPanelCall &call)=0 |
Protected Member Functions inherited from esphome::EntityBase | |
| StringRef | get_object_id_ref_for_api_ () const |
| void | calc_object_id_ () |
| bool | is_object_id_dynamic_ () const |
| Check if the object_id is dynamic (changes with MAC suffix) | |
Protected Attributes | |
| friend | AlarmControlPanelCall |
| ESPPreferenceObject | pref_ |
| AlarmControlPanelState | current_state_ |
| AlarmControlPanelState | desired_state_ |
| uint32_t | last_update_ |
| CallbackManager< void()> | state_callback_ {} |
| CallbackManager< void()> | triggered_callback_ {} |
| CallbackManager< void()> | arming_callback_ {} |
| CallbackManager< void()> | pending_callback_ {} |
| CallbackManager< void()> | armed_home_callback_ {} |
| CallbackManager< void()> | armed_night_callback_ {} |
| CallbackManager< void()> | armed_away_callback_ {} |
| CallbackManager< void()> | disarmed_callback_ {} |
| CallbackManager< void()> | cleared_callback_ {} |
| CallbackManager< void()> | chime_callback_ {} |
| CallbackManager< void()> | ready_callback_ {} |
Protected Attributes inherited from esphome::EntityBase | |
| StringRef | name_ |
| const char * | object_id_c_str_ {nullptr} |
| const char * | icon_c_str_ {nullptr} |
| uint32_t | object_id_hash_ {} |
| Device * | device_ {} |
| struct esphome::EntityBase::EntityFlags | flags_ |
Definition at line 25 of file alarm_control_panel.h.
| void esphome::alarm_control_panel::AlarmControlPanel::add_on_armed_away_callback | ( | std::function< void()> && | callback | ) |
Add a callback for when the state of the alarm_control_panel changes to armed_away.
| callback | The callback function |
Definition at line 88 of file alarm_control_panel.cpp.
| void esphome::alarm_control_panel::AlarmControlPanel::add_on_armed_home_callback | ( | std::function< void()> && | callback | ) |
Add a callback for when the state of the alarm_control_panel changes to armed_home.
| callback | The callback function |
Definition at line 80 of file alarm_control_panel.cpp.
| void esphome::alarm_control_panel::AlarmControlPanel::add_on_armed_night_callback | ( | std::function< void()> && | callback | ) |
Add a callback for when the state of the alarm_control_panel changes to armed_night.
| callback | The callback function |
Definition at line 84 of file alarm_control_panel.cpp.
| void esphome::alarm_control_panel::AlarmControlPanel::add_on_arming_callback | ( | std::function< void()> && | callback | ) |
Add a callback for when the state of the alarm_control_panel chanes to arming.
| callback | The callback function |
Definition at line 76 of file alarm_control_panel.cpp.
| void esphome::alarm_control_panel::AlarmControlPanel::add_on_chime_callback | ( | std::function< void()> && | callback | ) |
Add a callback for when a chime zone goes from closed to open.
| callback | The callback function |
Definition at line 104 of file alarm_control_panel.cpp.
| void esphome::alarm_control_panel::AlarmControlPanel::add_on_cleared_callback | ( | std::function< void()> && | callback | ) |
Add a callback for when the state of the alarm_control_panel clears from triggered.
| callback | The callback function |
Definition at line 100 of file alarm_control_panel.cpp.
| void esphome::alarm_control_panel::AlarmControlPanel::add_on_disarmed_callback | ( | std::function< void()> && | callback | ) |
Add a callback for when the state of the alarm_control_panel changes to disarmed.
| callback | The callback function |
Definition at line 96 of file alarm_control_panel.cpp.
| void esphome::alarm_control_panel::AlarmControlPanel::add_on_pending_callback | ( | std::function< void()> && | callback | ) |
Add a callback for when the state of the alarm_control_panel changes to pending.
| callback | The callback function |
Definition at line 92 of file alarm_control_panel.cpp.
| void esphome::alarm_control_panel::AlarmControlPanel::add_on_ready_callback | ( | std::function< void()> && | callback | ) |
Add a callback for when a ready state changes.
| callback | The callback function |
Definition at line 108 of file alarm_control_panel.cpp.
| void esphome::alarm_control_panel::AlarmControlPanel::add_on_state_callback | ( | std::function< void()> && | callback | ) |
Add a callback for when the state of the alarm_control_panel changes.
| callback | The callback function |
Definition at line 68 of file alarm_control_panel.cpp.
| void esphome::alarm_control_panel::AlarmControlPanel::add_on_triggered_callback | ( | std::function< void()> && | callback | ) |
Add a callback for when the state of the alarm_control_panel chanes to triggered.
| callback | The callback function |
Definition at line 72 of file alarm_control_panel.cpp.
| void esphome::alarm_control_panel::AlarmControlPanel::arm_away | ( | optional< std::string > | code = nullopt | ) |
arm the alarm in away mode
| code | The code |
Definition at line 112 of file alarm_control_panel.cpp.
| void esphome::alarm_control_panel::AlarmControlPanel::arm_custom_bypass | ( | optional< std::string > | code = nullopt | ) |
arm the alarm in custom bypass mode
| code | The code |
Definition at line 144 of file alarm_control_panel.cpp.
| void esphome::alarm_control_panel::AlarmControlPanel::arm_home | ( | optional< std::string > | code = nullopt | ) |
arm the alarm in home mode
| code | The code |
Definition at line 120 of file alarm_control_panel.cpp.
| void esphome::alarm_control_panel::AlarmControlPanel::arm_night | ( | optional< std::string > | code = nullopt | ) |
arm the alarm in night mode
| code | The code |
Definition at line 128 of file alarm_control_panel.cpp.
| void esphome::alarm_control_panel::AlarmControlPanel::arm_vacation | ( | optional< std::string > | code = nullopt | ) |
arm the alarm in vacation mode
| code | The code |
Definition at line 136 of file alarm_control_panel.cpp.
|
protectedpure virtual |
Implemented in esphome::demo::DemoAlarmControlPanel, and esphome::template_::TemplateAlarmControlPanel.
|
pure virtual |
Returns if the alarm_control_panel has a code.
Implemented in esphome::demo::DemoAlarmControlPanel, and esphome::template_::TemplateAlarmControlPanel.
|
pure virtual |
Returns if the alarm_control_panel requires a code to arm.
Implemented in esphome::demo::DemoAlarmControlPanel, and esphome::template_::TemplateAlarmControlPanel.
|
inline |
Get the state.
Definition at line 158 of file alarm_control_panel.h.
|
pure virtual |
A numeric representation of the supported features as per HomeAssistant.
Implemented in esphome::demo::DemoAlarmControlPanel, and esphome::template_::TemplateAlarmControlPanel.
| bool esphome::alarm_control_panel::AlarmControlPanel::is_state_armed | ( | AlarmControlPanelState | state | ) |
Definition at line 18 of file alarm_control_panel.cpp.
| AlarmControlPanelCall esphome::alarm_control_panel::AlarmControlPanel::make_call | ( | ) |
Make a AlarmControlPanelCall.
Definition at line 16 of file alarm_control_panel.cpp.
| void esphome::alarm_control_panel::AlarmControlPanel::publish_state | ( | AlarmControlPanelState | state | ) |
Set the state of the alarm_control_panel.
| state | The AlarmControlPanelState. |
Definition at line 31 of file alarm_control_panel.cpp.
|
protected |
Definition at line 164 of file alarm_control_panel.h.
|
protected |
Definition at line 188 of file alarm_control_panel.h.
|
protected |
Definition at line 184 of file alarm_control_panel.h.
|
protected |
Definition at line 186 of file alarm_control_panel.h.
|
protected |
Definition at line 180 of file alarm_control_panel.h.
|
protected |
Definition at line 194 of file alarm_control_panel.h.
|
protected |
Definition at line 192 of file alarm_control_panel.h.
|
protected |
Definition at line 168 of file alarm_control_panel.h.
|
protected |
Definition at line 170 of file alarm_control_panel.h.
|
protected |
Definition at line 190 of file alarm_control_panel.h.
|
protected |
Definition at line 172 of file alarm_control_panel.h.
|
protected |
Definition at line 182 of file alarm_control_panel.h.
|
protected |
Definition at line 166 of file alarm_control_panel.h.
|
protected |
Definition at line 196 of file alarm_control_panel.h.
|
protected |
Definition at line 176 of file alarm_control_panel.h.
|
protected |
Definition at line 178 of file alarm_control_panel.h.