7 namespace alarm_control_panel {
92 void play(Ts...
x)
override {
93 auto call = this->alarm_control_panel_->make_call();
94 auto code = this->code_.optional_value(
x...);
95 if (code.has_value()) {
96 call.set_code(code.value());
112 void play(Ts...
x)
override {
113 auto call = this->alarm_control_panel_->make_call();
114 auto code = this->code_.optional_value(
x...);
115 if (code.has_value()) {
116 call.set_code(code.value());
132 void play(Ts...
x)
override {
133 auto call = this->alarm_control_panel_->make_call();
134 auto code = this->code_.optional_value(
x...);
135 if (code.has_value()) {
136 call.set_code(code.value());
152 void play(Ts...
x)
override { this->alarm_control_panel_->disarm(this->code_.optional_value(
x...)); }
162 void play(Ts...
x)
override { this->alarm_control_panel_->make_call().pending().perform(); }
172 void play(Ts...
x)
override { this->alarm_control_panel_->make_call().triggered().perform(); }
182 return this->parent_->is_state_armed(this->parent_->get_state()) ||
AlarmControlPanel * alarm_control_panel_
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.
AlarmControlPanelCondition(AlarmControlPanel *parent)
AlarmControlPanel * alarm_control_panel_
AlarmControlPanel * alarm_control_panel_
ArmAwayAction(AlarmControlPanel *alarm_control_panel)
void add_on_cleared_callback(std::function< void()> &&callback)
Add a callback for when the state of the alarm_control_panel clears from triggered.
ArmedHomeTrigger(AlarmControlPanel *alarm_control_panel)
void add_on_triggered_callback(std::function< void()> &&callback)
Add a callback for when the state of the alarm_control_panel chanes to triggered. ...
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. ...
ArmedAwayTrigger(AlarmControlPanel *alarm_control_panel)
PendingTrigger(AlarmControlPanel *alarm_control_panel)
TEMPLATABLE_VALUE(std::string, code) void play(Ts... x) override
void play(Ts... x) override
TEMPLATABLE_VALUE(std::string, code) void play(Ts... x) override
void add_on_chime_callback(std::function< void()> &&callback)
Add a callback for when a chime zone goes from closed to open.
void trigger(Ts... x)
Inform the parent automation that the event has triggered.
TEMPLATABLE_VALUE(std::string, code) void play(Ts... x) override
AlarmControlPanel * parent_
Base class for all automation conditions.
ArmingTrigger(AlarmControlPanel *alarm_control_panel)
void add_on_state_callback(std::function< void()> &&callback)
Add a callback for when the state of the alarm_control_panel changes.
AlarmControlPanel * alarm_control_panel_
ClearedTrigger(AlarmControlPanel *alarm_control_panel)
ArmHomeAction(AlarmControlPanel *alarm_control_panel)
ChimeTrigger(AlarmControlPanel *alarm_control_panel)
ReadyTrigger(AlarmControlPanel *alarm_control_panel)
AlarmControlPanel * alarm_control_panel_
PendingAction(AlarmControlPanel *alarm_control_panel)
DisarmedTrigger(AlarmControlPanel *alarm_control_panel)
TriggeredTrigger(AlarmControlPanel *alarm_control_panel)
StateTrigger(AlarmControlPanel *alarm_control_panel)
bool check(Ts... x) override
TEMPLATABLE_VALUE(std::string, code) void play(Ts... x) override
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.
AlarmControlPanel * alarm_control_panel_
void play(Ts... x) override
DisarmAction(AlarmControlPanel *alarm_control_panel)
ArmedNightTrigger(AlarmControlPanel *alarm_control_panel)
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.
TriggeredAction(AlarmControlPanel *alarm_control_panel)
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.
ArmNightAction(AlarmControlPanel *alarm_control_panel)