diff --git a/esphome/components/fan/fan_traits.h b/esphome/components/fan/fan_traits.h index 8a25c287ab..4c10ccd10a 100644 --- a/esphome/components/fan/fan_traits.h +++ b/esphome/components/fan/fan_traits.h @@ -42,6 +42,8 @@ class FanTraits { void set_direction(bool direction) { this->direction_ = direction; } /// Return the preset modes supported by the fan. const FixedVector &supported_preset_modes() const { return *this->preset_modes_; } + /// Set the preset modes supported by the fan. + void set_supported_preset_modes(const FixedVector *preset_modes) { this->preset_modes_ = preset_modes; } /// Return if preset modes are supported bool supports_preset_modes() const { return !this->preset_modes_->empty(); } diff --git a/esphome/components/hbridge/fan/hbridge_fan.h b/esphome/components/hbridge/fan/hbridge_fan.h index 847eca6166..e4b075f759 100644 --- a/esphome/components/hbridge/fan/hbridge_fan.h +++ b/esphome/components/hbridge/fan/hbridge_fan.h @@ -21,7 +21,6 @@ class HBridgeFan : public Component, public fan::Fan { void set_pin_a(output::FloatOutput *pin_a) { pin_a_ = pin_a; } void set_pin_b(output::FloatOutput *pin_b) { pin_b_ = pin_b; } void set_enable_pin(output::FloatOutput *enable) { enable_ = enable; } - void set_oscillating(output::BinaryOutput *oscillating) { this->oscillating_ = oscillating; } void set_preset_modes(const std::initializer_list &presets) { this->preset_modes_ = presets; } void setup() override;