43 bool check(Ts...
x)
override {
return this->parent_->state == this->state_; }
Base class for all switches.
SwitchTurnOffTrigger(Switch *a_switch)
void play(Ts... x) override
void play(Ts... x) override
SwitchPublishAction(Switch *a_switch)
void play(Ts... x) override
TurnOffAction(Switch *a_switch)
void add_on_state_callback(std::function< void(bool)> &&callback)
Set callback for state changes.
Base class for all automation conditions.
void turn_on()
Turn this switch on.
TEMPLATABLE_VALUE(bool, state) void play(Ts... x) override
void toggle()
Toggle this switch.
SwitchTurnOnTrigger(Switch *a_switch)
TurnOnAction(Switch *a_switch)
Implementation of SPI Controller mode.
bool check(Ts... x) override
void publish_state(bool state)
Publish a state to the front-end from the back-end.
ToggleAction(Switch *a_switch)
SwitchCondition(Switch *parent, bool state)
void turn_off()
Turn this switch off.