13 namespace alarm_control_panel {
AlarmControlPanelState get_state() const
Get the state.
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
virtual bool get_requires_code() const =0
Returns if the alarm_control_panel has a code.
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.
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 nullopt_t nullopt((nullopt_t::init()))
void arm_custom_bypass(optional< std::string > code=nullopt)
arm the alarm in custom bypass mode
CallbackManager< void()> armed_away_callback_
virtual void control(const AlarmControlPanelCall &call)=0
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_
virtual uint32_t get_supported_features() const =0
A numeric representation of the supported features as per HomeAssistant.
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.
virtual bool get_requires_code_to_arm() const =0
Returns if the alarm_control_panel requires a code to arm.
CallbackManager< void()> ready_callback_