13static const char *
const TAG =
"alarm_control_panel";
39#if defined(USE_ALARM_CONTROL_PANEL) && defined(USE_CONTROLLER_REGISTRY)
73 call.set_code(code.
value());
81 call.set_code(code.
value());
89 call.set_code(code.
value());
97 call.set_code(code.
value());
103 call.arm_custom_bypass();
105 call.set_code(code.
value());
113 call.set_code(code.
value());
static void notify_alarm_control_panel_update(alarm_control_panel::AlarmControlPanel *obj)
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.
LazyCallbackManager< void()> ready_callback_
bool is_state_armed(AlarmControlPanelState state)
ESPPreferenceObject pref_
LazyCallbackManager< void()> chime_callback_
LazyCallbackManager< void()> state_callback_
void arm_vacation(optional< std::string > code=nullopt)
arm the alarm in vacation mode
LazyCallbackManager< void()> cleared_callback_
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
void arm_night(optional< std::string > code=nullopt)
arm the alarm in night mode
AlarmControlPanelState current_state_
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.
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.
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
uint32_t IRAM_ATTR HOT millis()