virtual void play(Ts... x)=0
Base class for all automation conditions.
SwitchCondition(Switch *parent, bool state)
bool check(Ts... x) override
Base class for all switches.
void toggle()
Toggle this switch.
void turn_on()
Turn this switch on.
void turn_off()
Turn this switch off.
bool state
The current reported state of the binary sensor.
void add_on_state_callback(std::function< void(bool)> &&callback)
Set callback for state changes.
void publish_state(bool state)
Publish a state to the front-end from the back-end.
SwitchPublishAction(Switch *a_switch)
TEMPLATABLE_VALUE(bool, state) void play(Ts... x) override
SwitchTurnOffTrigger(Switch *a_switch)
SwitchTurnOnTrigger(Switch *a_switch)
ToggleAction(Switch *a_switch)
void play(Ts... x) override
void play(Ts... x) override
TurnOffAction(Switch *a_switch)
TurnOnAction(Switch *a_switch)
void play(Ts... x) override
Providing packet encoding functions for exchanging data with a remote host.