ESPHome
2024.12.2
|
#include <template_alarm_control_panel.h>
Public Member Functions | |
TemplateAlarmControlPanel () | |
void | dump_config () override |
void | setup () override |
void | loop () override |
uint32_t | get_supported_features () const override |
bool | get_requires_code () const override |
bool | get_requires_code_to_arm () const override |
bool | get_all_sensors_ready () |
void | set_restore_mode (TemplateAlarmControlPanelRestoreMode restore_mode) |
void | add_sensor (binary_sensor::BinarySensor *sensor, uint16_t flags=0, AlarmSensorType type=ALARM_SENSOR_TYPE_DELAYED) |
Add a binary_sensor to the alarm_panel. More... | |
void | add_code (const std::string &code) |
add a code More... | |
void | set_requires_code_to_arm (bool code_to_arm) |
set requires a code to arm More... | |
void | set_arming_away_time (uint32_t time) |
set the delay before arming away More... | |
void | set_arming_home_time (uint32_t time) |
set the delay before arming home More... | |
void | set_arming_night_time (uint32_t time) |
set the delay before arming night More... | |
void | set_pending_time (uint32_t time) |
set the delay before triggering More... | |
void | set_trigger_time (uint32_t time) |
set the delay before resetting after triggered More... | |
void | set_supports_arm_home (bool supports_arm_home) |
void | set_supports_arm_night (bool supports_arm_night) |
Public Member Functions inherited from esphome::alarm_control_panel::AlarmControlPanel | |
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... | |
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) |
Public Member Functions inherited from esphome::Component | |
virtual float | get_setup_priority () const |
priority of setup(). More... | |
float | get_actual_setup_priority () const |
void | set_setup_priority (float priority) |
virtual float | get_loop_priority () const |
priority of loop(). More... | |
void | call () |
virtual void | on_shutdown () |
virtual void | on_safe_shutdown () |
uint32_t | get_component_state () const |
virtual void | mark_failed () |
Mark this component as failed. More... | |
bool | is_failed () const |
bool | is_ready () const |
virtual bool | can_proceed () |
bool | status_has_warning () const |
bool | status_has_error () const |
void | status_set_warning (const char *message="unspecified") |
void | status_set_error (const char *message="unspecified") |
void | status_clear_warning () |
void | status_clear_error () |
void | status_momentary_warning (const std::string &name, uint32_t length=5000) |
void | status_momentary_error (const std::string &name, uint32_t length=5000) |
bool | has_overridden_loop () const |
void | set_component_source (const char *source) |
Set where this component was loaded from for some debug messages. More... | |
const char * | get_component_source () const |
Get the integration where this component was declared as a string. More... | |
Protected Member Functions | |
void | control (const alarm_control_panel::AlarmControlPanelCall &call) override |
bool | is_code_valid_ (optional< std::string > code) |
void | arm_ (optional< std::string > code, alarm_control_panel::AlarmControlPanelState state, uint32_t delay) |
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 Member Functions inherited from esphome::Component | |
virtual void | call_loop () |
virtual void | call_setup () |
virtual void | call_dump_config () |
void | set_interval (const std::string &name, uint32_t interval, std::function< void()> &&f) |
Set an interval function with a unique name. More... | |
void | set_interval (uint32_t interval, std::function< void()> &&f) |
bool | cancel_interval (const std::string &name) |
Cancel an interval function. More... | |
void | set_retry (const std::string &name, uint32_t initial_wait_time, uint8_t max_attempts, std::function< RetryResult(uint8_t)> &&f, float backoff_increase_factor=1.0f) |
Set an retry function with a unique name. More... | |
void | set_retry (uint32_t initial_wait_time, uint8_t max_attempts, std::function< RetryResult(uint8_t)> &&f, float backoff_increase_factor=1.0f) |
bool | cancel_retry (const std::string &name) |
Cancel a retry function. More... | |
void | set_timeout (const std::string &name, uint32_t timeout, std::function< void()> &&f) |
Set a timeout function with a unique name. More... | |
void | set_timeout (uint32_t timeout, std::function< void()> &&f) |
bool | cancel_timeout (const std::string &name) |
Cancel a timeout function. More... | |
void | defer (const std::string &name, std::function< void()> &&f) |
Defer a callback to the next loop() call. More... | |
void | defer (std::function< void()> &&f) |
Defer a callback to the next loop() call. More... | |
bool | cancel_defer (const std::string &name) |
Cancel a defer callback using the specified name, name must not be empty. More... | |
Definition at line 50 of file template_alarm_control_panel.h.
esphome::template_::TemplateAlarmControlPanel::TemplateAlarmControlPanel | ( | ) |
Definition at line 16 of file template_alarm_control_panel.cpp.
|
inline |
void esphome::template_::TemplateAlarmControlPanel::add_sensor | ( | binary_sensor::BinarySensor * | sensor, |
uint16_t | flags = 0 , |
||
AlarmSensorType | type = ALARM_SENSOR_TYPE_DELAYED |
||
) |
Add a binary_sensor to the alarm_panel.
sensor | The BinarySensor instance. |
ignore_when_home | if this should be ignored when armed_home mode |
Definition at line 19 of file template_alarm_control_panel.cpp.
|
protected |
Definition at line 221 of file template_alarm_control_panel.cpp.
|
overrideprotectedvirtual |
Implements esphome::alarm_control_panel::AlarmControlPanel.
Definition at line 239 of file template_alarm_control_panel.cpp.
|
overridevirtual |
Reimplemented from esphome::Component.
Definition at line 30 of file template_alarm_control_panel.cpp.
|
inline |
Definition at line 59 of file template_alarm_control_panel.h.
|
overridevirtual |
Implements esphome::alarm_control_panel::AlarmControlPanel.
Definition at line 219 of file template_alarm_control_panel.cpp.
|
inlineoverridevirtual |
Implements esphome::alarm_control_panel::AlarmControlPanel.
Definition at line 58 of file template_alarm_control_panel.h.
|
overridevirtual |
Implements esphome::alarm_control_panel::AlarmControlPanel.
Definition at line 208 of file template_alarm_control_panel.cpp.
|
protected |
Definition at line 196 of file template_alarm_control_panel.cpp.
|
overridevirtual |
Reimplemented from esphome::Component.
Definition at line 90 of file template_alarm_control_panel.cpp.
|
inline |
set the delay before arming away
time | The milliseconds |
Definition at line 88 of file template_alarm_control_panel.h.
|
inline |
set the delay before arming home
time | The milliseconds |
Definition at line 94 of file template_alarm_control_panel.h.
|
inline |
set the delay before arming night
time | The milliseconds |
Definition at line 100 of file template_alarm_control_panel.h.
|
inline |
set the delay before triggering
time | The milliseconds |
Definition at line 106 of file template_alarm_control_panel.h.
|
inline |
set requires a code to arm
code_to_arm | The requires code to arm |
Definition at line 82 of file template_alarm_control_panel.h.
|
inline |
Definition at line 60 of file template_alarm_control_panel.h.
|
inline |
Definition at line 114 of file template_alarm_control_panel.h.
|
inline |
Definition at line 116 of file template_alarm_control_panel.h.
|
inline |
set the delay before resetting after triggered
time | The milliseconds |
Definition at line 112 of file template_alarm_control_panel.h.
|
overridevirtual |
Reimplemented from esphome::Component.
Definition at line 70 of file template_alarm_control_panel.cpp.
|
protected |
Definition at line 128 of file template_alarm_control_panel.h.
|
protected |
Definition at line 130 of file template_alarm_control_panel.h.
|
protected |
Definition at line 132 of file template_alarm_control_panel.h.
|
protected |
Definition at line 138 of file template_alarm_control_panel.h.
|
protected |
Definition at line 147 of file template_alarm_control_panel.h.
|
protected |
Definition at line 134 of file template_alarm_control_panel.h.
|
protected |
Definition at line 142 of file template_alarm_control_panel.h.
|
protected |
Definition at line 125 of file template_alarm_control_panel.h.
|
protected |
Definition at line 140 of file template_alarm_control_panel.h.
|
protected |
Definition at line 122 of file template_alarm_control_panel.h.
|
protected |
Definition at line 145 of file template_alarm_control_panel.h.
|
protected |
Definition at line 146 of file template_alarm_control_panel.h.
|
protected |
Definition at line 143 of file template_alarm_control_panel.h.
|
protected |
Definition at line 144 of file template_alarm_control_panel.h.
|
protected |
Definition at line 136 of file template_alarm_control_panel.h.