59 if (this->stop_.has_value())
61 if (this->position_.has_value())
Base class for all automation conditions.
void play(Ts... x) override
CloseAction(Valve *valve)
ControlAction(Valve *valve)
TEMPLATABLE_VALUE(bool, stop) TEMPLATABLE_VALUE(float
position void play(Ts... x) override
void play(Ts... x) override
void play(Ts... x) override
void play(Ts... x) override
ToggleAction(Valve *valve)
ValveCall & set_stop(bool stop)
Set whether this valve call should stop the valve.
ValveCall & set_command_close()
Set the command to close the valve.
ValveCall & set_position(float position)
Set the call to a certain target position.
ValveCall & set_command_toggle()
Set the command to toggle the valve.
ValveCall & set_command_stop()
Set the command to stop the valve.
ValveCall & set_command_open()
Set the command to open the valve.
void perform()
Perform the valve call.
ValveClosedTrigger(Valve *a_valve)
Base class for all valve devices.
bool is_fully_closed() const
Helper method to check if the valve is fully closed. Equivalent to comparing .position against 0....
bool is_fully_open() const
Helper method to check if the valve is fully open. Equivalent to comparing .position against 1....
ValveCall make_call()
Construct a new valve call used to control the valve.
void add_on_state_callback(std::function< void()> &&f)
ValveIsClosedCondition(Valve *valve)
bool check(Ts... x) override
ValveIsOpenCondition(Valve *valve)
bool check(Ts... x) override
ValveOpenTrigger(Valve *a_valve)
Providing packet encoding functions for exchanging data with a remote host.