mirror of
https://github.com/esphome/esphome.git
synced 2025-09-10 23:32:23 +01:00
Fix fan speed restore issue on boot (#1867)
This commit is contained in:
@@ -55,7 +55,10 @@ void BinaryFan::loop() {
|
||||
ESP_LOGD(TAG, "Setting reverse direction: %s", ONOFF(enable));
|
||||
}
|
||||
}
|
||||
float BinaryFan::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 BinaryFan::get_setup_priority() const { return fan_->get_setup_priority() + 1.0f; }
|
||||
|
||||
} // namespace binary
|
||||
} // namespace esphome
|
||||
|
Reference in New Issue
Block a user