diff --git a/esphome/core/automation.h b/esphome/core/automation.h index 021e9ec68e..6e1abcef55 100644 --- a/esphome/core/automation.h +++ b/esphome/core/automation.h @@ -471,7 +471,7 @@ template class ActionList { template class Automation { public: Automation() = default; - explicit Automation(Trigger *trigger) : trigger_(trigger) { this->trigger_->set_automation_parent(this); } + explicit Automation(Trigger *trigger) { trigger->set_automation_parent(this); } void add_action(Action *action) { this->actions_.add_action(action); } void add_actions(const std::initializer_list *> &actions) { this->actions_.add_actions(actions); } @@ -488,7 +488,6 @@ template class Automation { int num_running() { return this->actions_.num_running(); } protected: - Trigger *trigger_{nullptr}; ActionList actions_; };