fix: template cover add position action (#877)

* Update const.py

* Update __init__.py

* Update template_cover.cpp

* Update __init__.py

* Update test3.yaml

* formatting code

* formatting code 2

* removed position lambda

* Update test3.yaml

* Update __init__.py
This commit is contained in:
KristopherMackowiak
2019-11-21 21:57:27 +01:00
committed by Guillermo Ruffino
parent 6a0268b852
commit be36eef939
4 changed files with 16 additions and 5 deletions
@@ -86,10 +86,10 @@ void TemplateCover::control(const CoverCall &call) {
} else if (pos == COVER_CLOSED) {
this->close_trigger_->trigger();
this->prev_command_trigger_ = this->close_trigger_;
} else {
this->position_trigger_->trigger(pos);
}
this->position_trigger_->trigger(pos);
if (this->optimistic_) {
this->position = pos;
}