diff --git a/esphome/components/whynter/whynter.cpp b/esphome/components/whynter/whynter.cpp index b8a8db4d7c..f5f304aa17 100644 --- a/esphome/components/whynter/whynter.cpp +++ b/esphome/components/whynter/whynter.cpp @@ -84,8 +84,8 @@ void Whynter::transmit_state() { if (fahrenheit_) { remote_state |= UNIT_MASK; - uint8_t temp = - (uint8_t) clamp(esphome::celsius_to_fahrenheit(this->target_temperature), TEMP_MIN_F, TEMP_MAX_F); + uint8_t temp = (uint8_t) roundf( + clamp(esphome::celsius_to_fahrenheit(this->target_temperature), TEMP_MIN_F, TEMP_MAX_F)); temp = esphome::reverse_bits(temp); remote_state |= temp; } else {