From e96b5ef2b016e3dbea37ead117c47b1a6a8ffc59 Mon Sep 17 00:00:00 2001 From: akasma74 Date: Fri, 8 Nov 2019 08:25:37 +0000 Subject: [PATCH] Fix generic_thermostat too_hot/too_cold (#27860) * fix for too_hot/too_cold Closes #27802 * too_hot correction --- homeassistant/components/generic_thermostat/climate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/generic_thermostat/climate.py b/homeassistant/components/generic_thermostat/climate.py index 13e23b962c9..b765dbbfda4 100644 --- a/homeassistant/components/generic_thermostat/climate.py +++ b/homeassistant/components/generic_thermostat/climate.py @@ -412,8 +412,8 @@ class GenericThermostat(ClimateDevice, RestoreEntity): if not long_enough: return - too_cold = self._target_temp - self._cur_temp >= self._cold_tolerance - too_hot = self._cur_temp - self._target_temp >= self._hot_tolerance + too_cold = self._target_temp >= self._cur_temp + self._cold_tolerance + too_hot = self._cur_temp >= self._target_temp + self._hot_tolerance if self._is_device_active: if (self.ac_mode and too_cold) or (not self.ac_mode and too_hot): _LOGGER.info("Turning off heater %s", self.heater_entity_id)