diff --git a/esphome/components/fan/fan.h b/esphome/components/fan/fan.h index 26b34d2bc6c..d5763edf2f7 100644 --- a/esphome/components/fan/fan.h +++ b/esphome/components/fan/fan.h @@ -178,7 +178,7 @@ class Fan : public EntityBase { /// Wire the Fan-owned preset modes pointer into the given traits object. void wire_preset_modes_(FanTraits &traits) { if (this->supported_preset_modes_) { - traits.set_supported_preset_modes(this->supported_preset_modes_); + traits.set_supported_preset_modes_(this->supported_preset_modes_); } } diff --git a/esphome/components/fan/fan_traits.h b/esphome/components/fan/fan_traits.h index 05810ceea44..78c215dc8c9 100644 --- a/esphome/components/fan/fan_traits.h +++ b/esphome/components/fan/fan_traits.h @@ -77,7 +77,9 @@ class FanTraits { protected: /// Set the preset modes pointer (only Fan::wire_preset_modes_() should call this). - void set_supported_preset_modes(const std::vector *preset_modes) { this->preset_modes_ = preset_modes; } + void set_supported_preset_modes_(const std::vector *preset_modes) { + this->preset_modes_ = preset_modes; + } bool oscillation_{false}; bool speed_{false};