mirror of
https://github.com/esphome/esphome.git
synced 2024-11-27 09:18:00 +01:00
Template Cover don't auto-set current_operation (#612)
Fixes https://github.com/esphome/issues/issues/408
This commit is contained in:
parent
aacb9e44e8
commit
533f81d625
1 changed files with 0 additions and 7 deletions
|
@ -74,19 +74,12 @@ void TemplateCover::control(const CoverCall &call) {
|
|||
this->stop_prev_trigger_();
|
||||
this->stop_trigger_->trigger();
|
||||
this->prev_command_trigger_ = this->stop_trigger_;
|
||||
this->current_operation = COVER_OPERATION_IDLE;
|
||||
this->publish_state();
|
||||
}
|
||||
if (call.get_position().has_value()) {
|
||||
auto pos = *call.get_position();
|
||||
this->stop_prev_trigger_();
|
||||
|
||||
if (pos < this->position) {
|
||||
this->current_operation = COVER_OPERATION_CLOSING;
|
||||
} else if (pos > this->position) {
|
||||
this->current_operation = COVER_OPERATION_OPENING;
|
||||
}
|
||||
|
||||
if (pos == COVER_OPEN) {
|
||||
this->open_trigger_->trigger();
|
||||
this->prev_command_trigger_ = this->open_trigger_;
|
||||
|
|
Loading…
Reference in a new issue