From c9be201ee2fefd2842cec9c65a4f70ae60f3cc2d Mon Sep 17 00:00:00 2001 From: Andrew Date: Wed, 5 Feb 2020 16:44:44 -0600 Subject: [PATCH] Move program_mode check (#31501) Don't try to capture program_mode unless ct80 --- homeassistant/components/radiotherm/climate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/radiotherm/climate.py b/homeassistant/components/radiotherm/climate.py index a6beeaa187b..cba7a736df2 100644 --- a/homeassistant/components/radiotherm/climate.py +++ b/homeassistant/components/radiotherm/climate.py @@ -290,6 +290,8 @@ class RadioThermostat(ClimateDevice): ) return self._current_humidity = humiditydata + self._program_mode = data["program_mode"] + self._preset_mode = CODE_TO_PRESET_MODE[data["program_mode"]] # Map thermostat values into various STATE_ flags. self._current_temperature = current_temp @@ -297,8 +299,6 @@ class RadioThermostat(ClimateDevice): self._fstate = CODE_TO_FAN_STATE[data["fstate"]] self._tmode = CODE_TO_TEMP_MODE[data["tmode"]] self._tstate = CODE_TO_TEMP_STATE[data["tstate"]] - self._program_mode = data["program_mode"] - self._preset_mode = CODE_TO_PRESET_MODE[data["program_mode"]] self._current_operation = self._tmode if self._tmode == HVAC_MODE_COOL: