1
0
mirror of https://github.com/esphome/esphome.git synced 2026-02-08 00:31:58 +00:00
This commit is contained in:
J. Nick Koston
2025-11-28 21:19:47 -06:00
parent 192abf95ce
commit a30786b055

View File

@@ -65,7 +65,7 @@ void FanCall::validate_() {
auto traits = this->parent_.get_traits(); auto traits = this->parent_.get_traits();
if (this->speed_.has_value()) { if (this->speed_.has_value()) {
this->speed_ = clamp(*this->speed_, 1, traits.supported_speed_count()); this->speed_ = clamp(*this->speed_, 1, static_cast<int>(traits.supported_speed_count()));
// https://developers.home-assistant.io/docs/core/entity/fan/#preset-modes // https://developers.home-assistant.io/docs/core/entity/fan/#preset-modes
// "Manually setting a speed must disable any set preset mode" // "Manually setting a speed must disable any set preset mode"