1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-28 05:33:53 +00:00
This commit is contained in:
J. Nick Koston
2025-10-22 11:41:15 -10:00
parent 274c0505f7
commit 43bcd98649
2 changed files with 2 additions and 1 deletions

View File

@@ -42,6 +42,8 @@ class FanTraits {
void set_direction(bool direction) { this->direction_ = direction; }
/// Return the preset modes supported by the fan.
const FixedVector<std::string> &supported_preset_modes() const { return *this->preset_modes_; }
/// Set the preset modes supported by the fan.
void set_supported_preset_modes(const FixedVector<std::string> *preset_modes) { this->preset_modes_ = preset_modes; }
/// Return if preset modes are supported
bool supports_preset_modes() const { return !this->preset_modes_->empty(); }

View File

@@ -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<std::string> &presets) { this->preset_modes_ = presets; }
void setup() override;