[whynter] Fix truncating Fahrenheit temps that should be rounded (#18813)

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
This commit is contained in:
mfishma
2026-08-31 13:47:55 -04:00
committed by GitHub
co-authored by pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
parent bbe806f1e6
commit 06d477bea7
+2 -2
View File
@@ -84,8 +84,8 @@ void Whynter::transmit_state() {
if (fahrenheit_) {
remote_state |= UNIT_MASK;
uint8_t temp =
(uint8_t) clamp<float>(esphome::celsius_to_fahrenheit(this->target_temperature), TEMP_MIN_F, TEMP_MAX_F);
uint8_t temp = (uint8_t) roundf(
clamp<float>(esphome::celsius_to_fahrenheit(this->target_temperature), TEMP_MIN_F, TEMP_MAX_F));
temp = esphome::reverse_bits(temp);
remote_state |= temp;
} else {