ESPHome
2024.10.2
|
#include <alarm_control_panel.h>
Public Member Functions | |
AlarmControlPanelCall | make_call () |
Make a AlarmControlPanelCall. More... | |
void | publish_state (AlarmControlPanelState state) |
Set the state of the alarm_control_panel. More... | |
void | add_on_state_callback (std::function< void()> &&callback) |
Add a callback for when the state of the alarm_control_panel changes. More... | |
void | add_on_triggered_callback (std::function< void()> &&callback) |
Add a callback for when the state of the alarm_control_panel chanes to triggered. More... | |
void | add_on_arming_callback (std::function< void()> &&callback) |
Add a callback for when the state of the alarm_control_panel chanes to arming. More... | |
void | add_on_pending_callback (std::function< void()> &&callback) |
Add a callback for when the state of the alarm_control_panel changes to pending. More... | |
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. More... | |
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. More... | |
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. More... | |
void | add_on_disarmed_callback (std::function< void()> &&callback) |
Add a callback for when the state of the alarm_control_panel changes to disarmed. More... | |
void | add_on_cleared_callback (std::function< void()> &&callback) |
Add a callback for when the state of the alarm_control_panel clears from triggered. More... | |
void | add_on_chime_callback (std::function< void()> &&callback) |
Add a callback for when a chime zone goes from closed to open. More... | |
void | add_on_ready_callback (std::function< void()> &&callback) |
Add a callback for when a ready state changes. More... | |
virtual uint32_t | get_supported_features () const =0 |
A numeric representation of the supported features as per HomeAssistant. More... | |
virtual bool | get_requires_code () const =0 |
Returns if the alarm_control_panel has a code. More... | |
virtual bool | get_requires_code_to_arm () const =0 |
Returns if the alarm_control_panel requires a code to arm. More... | |
void | arm_away (optional< std::string > code=nullopt) |
arm the alarm in away mode More... | |
void | arm_home (optional< std::string > code=nullopt) |
arm the alarm in home mode More... | |
void | arm_night (optional< std::string > code=nullopt) |
arm the alarm in night mode More... | |
void | arm_vacation (optional< std::string > code=nullopt) |
arm the alarm in vacation mode More... | |
void | arm_custom_bypass (optional< std::string > code=nullopt) |
arm the alarm in custom bypass mode More... | |
void | disarm (optional< std::string > code=nullopt) |
disarm the alarm More... | |
AlarmControlPanelState | get_state () const |
Get the state. More... | |
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) |
std::string | get_icon () const |
void | set_icon (const char *icon) |
Protected Member Functions | |
virtual void | control (const AlarmControlPanelCall &call)=0 |
Protected Member Functions inherited from esphome::EntityBase | |
virtual uint32_t | hash_base () |
The hash_base() function has been deprecated. More... | |
void | calc_object_id_ () |
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_ |
bool | has_own_name_ {false} |
bool | internal_ {false} |
bool | disabled_by_default_ {false} |
EntityCategory | entity_category_ {ENTITY_CATEGORY_NONE} |
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 83 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 75 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 79 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 71 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 99 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 95 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 91 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 87 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 103 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 63 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 67 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 107 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 139 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 115 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 123 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 131 of file alarm_control_panel.cpp.
|
protectedpure virtual |
Implemented in esphome::template_::TemplateAlarmControlPanel.
|
pure virtual |
Returns if the alarm_control_panel has a code.
Implemented in esphome::template_::TemplateAlarmControlPanel.
|
pure virtual |
Returns if the alarm_control_panel requires a code to arm.
Implemented in 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::template_::TemplateAlarmControlPanel.
bool esphome::alarm_control_panel::AlarmControlPanel::is_state_armed | ( | AlarmControlPanelState | state | ) |
Definition at line 16 of file alarm_control_panel.cpp.
AlarmControlPanelCall esphome::alarm_control_panel::AlarmControlPanel::make_call | ( | ) |
Make a AlarmControlPanelCall.
Definition at line 14 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 29 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.