mirror of
https://github.com/esphome/esphome.git
synced 2025-10-31 23:21:54 +00:00
cleanup
This commit is contained in:
@@ -14,7 +14,7 @@ class TemplateFan : public Component, public fan::Fan {
|
||||
void set_has_direction(bool has_direction) { this->has_direction_ = has_direction; }
|
||||
void set_has_oscillating(bool has_oscillating) { this->has_oscillating_ = has_oscillating; }
|
||||
void set_speed_count(int count) { this->speed_count_ = count; }
|
||||
void set_preset_modes(const std::initializer_list<std::string> &presets) { this->preset_modes_ = presets; }
|
||||
void set_preset_modes(std::initializer_list<const char *> presets) { this->preset_modes_ = presets; }
|
||||
fan::FanTraits get_traits() override { return this->traits_; }
|
||||
|
||||
protected:
|
||||
@@ -24,7 +24,7 @@ class TemplateFan : public Component, public fan::Fan {
|
||||
bool has_direction_{false};
|
||||
int speed_count_{0};
|
||||
fan::FanTraits traits_;
|
||||
std::vector<std::string> preset_modes_{};
|
||||
FixedVector<const char *> preset_modes_{};
|
||||
};
|
||||
|
||||
} // namespace template_
|
||||
|
||||
Reference in New Issue
Block a user