10 namespace alarm_control_panel {
12 static const char *
const TAG =
"alarm_control_panel";
111 call.set_code(code.
value());
119 call.set_code(code.
value());
127 call.set_code(code.
value());
135 call.set_code(code.
value());
141 call.arm_custom_bypass();
143 call.set_code(code.
value());
151 call.set_code(code.
value());
value_type const & value() const
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_cleared_callback(std::function< void()> &&callback)
Add a callback for when the state of the alarm_control_panel clears from triggered.
void add_on_triggered_callback(std::function< void()> &&callback)
Add a callback for when the state of the alarm_control_panel chanes to triggered. ...
CallbackManager< void()> armed_night_callback_
AlarmControlPanelState desired_state_
void arm_vacation(optional< std::string > code=nullopt)
arm the alarm in vacation mode
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_disarmed_callback(std::function< void()> &&callback)
Add a callback for when the state of the alarm_control_panel changes to disarmed. ...
void arm_night(optional< std::string > code=nullopt)
arm the alarm in night mode
bool is_state_armed(AlarmControlPanelState state)
CallbackManager< void()> armed_home_callback_
void publish_state(AlarmControlPanelState state)
Set the state of the alarm_control_panel.
AlarmControlPanelCall make_call()
Make a AlarmControlPanelCall.
uint32_t IRAM_ATTR HOT millis()
void add_on_chime_callback(std::function< void()> &&callback)
Add a callback for when a chime zone goes from closed to open.
void disarm(optional< std::string > code=nullopt)
disarm the alarm
void arm_home(optional< std::string > code=nullopt)
arm the alarm in home mode
CallbackManager< void()> state_callback_
const LogString * alarm_control_panel_state_to_string(AlarmControlPanelState state)
Returns a string representation of the state.
void arm_custom_bypass(optional< std::string > code=nullopt)
arm the alarm in custom bypass mode
CallbackManager< void()> armed_away_callback_
CallbackManager< void()> triggered_callback_
void add_on_state_callback(std::function< void()> &&callback)
Add a callback for when the state of the alarm_control_panel changes.
CallbackManager< void()> pending_callback_
CallbackManager< void()> chime_callback_
ESPPreferenceObject pref_
void arm_away(optional< std::string > code=nullopt)
arm the alarm in away mode
void add_on_pending_callback(std::function< void()> &&callback)
Add a callback for when the state of the alarm_control_panel changes to pending.
Implementation of SPI Controller mode.
CallbackManager< void()> disarmed_callback_
CallbackManager< void()> arming_callback_
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.
AlarmControlPanelState current_state_
friend AlarmControlPanelCall
CallbackManager< void()> cleared_callback_
void add_on_ready_callback(std::function< void()> &&callback)
Add a callback for when a ready state changes.
void add_on_arming_callback(std::function< void()> &&callback)
Add a callback for when the state of the alarm_control_panel chanes to arming.
CallbackManager< void()> ready_callback_