From 533f81d625431b668bb66838a74632d34791233c Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Thu, 6 Jun 2019 13:13:56 +0200 Subject: [PATCH] Template Cover don't auto-set current_operation (#612) Fixes https://github.com/esphome/issues/issues/408 --- esphome/components/template/cover/template_cover.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/esphome/components/template/cover/template_cover.cpp b/esphome/components/template/cover/template_cover.cpp index dd1a081aaa..381e6dd6cd 100644 --- a/esphome/components/template/cover/template_cover.cpp +++ b/esphome/components/template/cover/template_cover.cpp @@ -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_;