1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-27 23:52:28 +01:00

New script modes POC (#1168)

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
This commit is contained in:
Otto Winter
2020-07-25 14:20:51 +02:00
committed by GitHub
parent 275c12150e
commit 32efa5d83e
12 changed files with 226 additions and 27 deletions

View File

@@ -67,9 +67,9 @@ class LambdaLightEffect : public LightEffect {
class AutomationLightEffect : public LightEffect {
public:
AutomationLightEffect(const std::string &name) : LightEffect(name) {}
void stop() override { this->trig_->stop(); }
void stop() override { this->trig_->stop_action(); }
void apply() override {
if (!this->trig_->is_running()) {
if (!this->trig_->is_action_running()) {
this->trig_->trigger();
}
}