mirror of
https://github.com/esphome/esphome.git
synced 2025-10-29 22:24:26 +00:00
New script modes POC (#1168)
Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
This commit is contained in:
@@ -120,7 +120,7 @@ void TemplateCover::set_has_position(bool has_position) { this->has_position_ =
|
||||
void TemplateCover::set_has_tilt(bool has_tilt) { this->has_tilt_ = has_tilt; }
|
||||
void TemplateCover::stop_prev_trigger_() {
|
||||
if (this->prev_command_trigger_ != nullptr) {
|
||||
this->prev_command_trigger_->stop();
|
||||
this->prev_command_trigger_->stop_action();
|
||||
this->prev_command_trigger_ = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ void TemplateSwitch::loop() {
|
||||
}
|
||||
void TemplateSwitch::write_state(bool state) {
|
||||
if (this->prev_trigger_ != nullptr) {
|
||||
this->prev_trigger_->stop();
|
||||
this->prev_trigger_->stop_action();
|
||||
}
|
||||
|
||||
if (state) {
|
||||
|
||||
Reference in New Issue
Block a user