mirror of
https://github.com/esphome/esphome.git
synced 2025-10-29 22:24:26 +00:00
reduce scope
This commit is contained in:
@@ -36,8 +36,7 @@ void HBridgeFan::setup() {
|
||||
|
||||
// Construct traits
|
||||
this->traits_ = fan::FanTraits(this->oscillating_ != nullptr, true, true, this->speed_count_);
|
||||
if (!this->preset_modes_.empty())
|
||||
this->traits_.set_supported_preset_modes(this->preset_modes_);
|
||||
this->traits_.set_supported_preset_modes(this->preset_modes_);
|
||||
}
|
||||
|
||||
void HBridgeFan::dump_config() {
|
||||
|
||||
@@ -15,8 +15,7 @@ void SpeedFan::setup() {
|
||||
|
||||
// Construct traits
|
||||
this->traits_ = fan::FanTraits(this->oscillating_ != nullptr, true, this->direction_ != nullptr, this->speed_count_);
|
||||
if (!this->preset_modes_.empty())
|
||||
this->traits_.set_supported_preset_modes(this->preset_modes_);
|
||||
this->traits_.set_supported_preset_modes(this->preset_modes_);
|
||||
}
|
||||
|
||||
void SpeedFan::dump_config() { LOG_FAN("", "Speed Fan", this); }
|
||||
|
||||
Reference in New Issue
Block a user