10namespace alarm_control_panel {
12static 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());
CallbackManager< void()> disarmed_callback_
void add_on_triggered_callback(std::function< void()> &&callback)
Add a callback for when the state of the alarm_control_panel chanes to triggered.
AlarmControlPanelState desired_state_
friend AlarmControlPanelCall
void add_on_state_callback(std::function< void()> &&callback)
Add a callback for when the state of the alarm_control_panel changes.
CallbackManager< void()> triggered_callback_
bool is_state_armed(AlarmControlPanelState state)
void add_on_pending_callback(std::function< void()> &&callback)
Add a callback for when the state of the alarm_control_panel changes to pending.
ESPPreferenceObject pref_
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_home_callback(std::function< void()> &&callback)
Add a callback for when the state of the alarm_control_panel changes to armed_home.
void arm_vacation(optional< std::string > code=nullopt)
arm the alarm in vacation mode
void arm_home(optional< std::string > code=nullopt)
arm the alarm in home mode
void arm_away(optional< std::string > code=nullopt)
arm the alarm in away mode
CallbackManager< void()> armed_night_callback_
CallbackManager< void()> state_callback_
CallbackManager< void()> armed_away_callback_
CallbackManager< void()> cleared_callback_
void arm_night(optional< std::string > code=nullopt)
arm the alarm in night mode
AlarmControlPanelState current_state_
CallbackManager< void()> chime_callback_
CallbackManager< void()> pending_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.
CallbackManager< void()> armed_home_callback_
void arm_custom_bypass(optional< std::string > code=nullopt)
arm the alarm in custom bypass mode
void publish_state(AlarmControlPanelState state)
Set the state of the alarm_control_panel.
void disarm(optional< std::string > code=nullopt)
disarm the alarm
void add_on_ready_callback(std::function< void()> &&callback)
Add a callback for when a ready state changes.
CallbackManager< void()> arming_callback_
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_disarmed_callback(std::function< void()> &&callback)
Add a callback for when the state of the alarm_control_panel changes to disarmed.
void add_on_chime_callback(std::function< void()> &&callback)
Add a callback for when a chime zone goes from closed to open.
CallbackManager< void()> ready_callback_
void add_on_arming_callback(std::function< void()> &&callback)
Add a callback for when the state of the alarm_control_panel chanes to arming.
AlarmControlPanelCall make_call()
Make a AlarmControlPanelCall.
value_type const & value() const
const LogString * alarm_control_panel_state_to_string(AlarmControlPanelState state)
Returns a string representation of the state.
@ ACP_STATE_ARMED_VACATION
@ ACP_STATE_ARMED_CUSTOM_BYPASS
Providing packet encoding functions for exchanging data with a remote host.
uint32_t IRAM_ATTR HOT millis()