mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 05:24:53 +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
73eea154d5
commit
16ae46e958
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