67 void play(
const Ts &...
x)
override {
80 using ApplyFn = void (*)(
Cover *,
const std::remove_cvref_t<Ts> &...);
83 void play(
const Ts &...
x)
override {
97 bool check(
const Ts &...
x)
override {
return this->
cover_->
position == (OPEN ? COVER_OPEN : COVER_CLOSED); }
131 if (current_op == OP) {
132 if (!this->
last_operation_.has_value() || this->last_operation_.value() != OP) {
Base class for all automation conditions.
void trigger(const Ts &...x) ESPHOME_ALWAYS_INLINE
void play(const Ts &...x) override
CloseAction(Cover *cover)
void(*)(CoverCall &, const std::remove_cvref_t< Ts > &...) ApplyFn
ControlAction(Cover *cover, ApplyFn apply)
void play(const Ts &...x) override
CoverCall & set_command_toggle()
Set the command to toggle the cover.
CoverCall & set_command_open()
Set the command to open the cover.
CoverCall & set_command_close()
Set the command to close the cover.
void perform()
Perform the cover call.
CoverCall & set_command_stop()
Set the command to stop the cover.
Base class for all cover devices.
CoverOperation current_operation
The current operation of the cover (idle, opening, closing).
void add_on_state_callback(F &&f)
void publish_state(bool save=true)
Publish the current state of the cover.
CoverCall make_call()
Construct a new cover call used to control the cover.
float position
The position of the cover from 0.0 (fully closed) to 1.0 (fully open).
bool check(const Ts &...x) override
CoverPositionCondition(Cover *cover)
CoverPositionTrigger(Cover *a_cover)
CoverPublishAction(Cover *cover, ApplyFn apply)
void(*)(Cover *, const std::remove_cvref_t< Ts > &...) ApplyFn
void play(const Ts &...x) override
optional< CoverOperation > last_operation_
CoverTrigger(Cover *a_cover)
void play(const Ts &...x) override
void play(const Ts &...x) override
void play(const Ts &...x) override
ToggleAction(Cover *cover)
void apply(Climate *climate)
Apply these settings to the climate device.