mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-05-19 04:33:27 +02:00
Fix fan speed restore issue on boot (#1867)
This commit is contained in:
@@ -56,7 +56,10 @@ void SpeedFan::loop() {
|
||||
ESP_LOGD(TAG, "Setting reverse direction: %s", ONOFF(enable));
|
||||
}
|
||||
}
|
||||
float SpeedFan::get_setup_priority() const { return setup_priority::DATA; }
|
||||
|
||||
// We need a higher priority than the FanState component to make sure that the traits are set
|
||||
// when that component sets itself up.
|
||||
float SpeedFan::get_setup_priority() const { return fan_->get_setup_priority() + 1.0f; }
|
||||
|
||||
} // namespace speed
|
||||
} // namespace esphome
|
||||
|
||||
Reference in New Issue
Block a user