From 504ad6488cf214da4e45e51889c1241ee0996ddf Mon Sep 17 00:00:00 2001 From: Ari Date: Fri, 8 Nov 2019 13:08:50 -0500 Subject: [PATCH] Add support for Heat Mode detection for ecobee Heat Pumps (#28273) * Add support for Heat Mode detection for Heat Pumps - Fixes #26547 Since the ecobee component started to dynamically set the supported HVAC modes based on querying the device a few releases ago, users with Heat Pumps noticed that the Heat mode was no longer offered as an option by HA. Some of us did not actually notice until the summer was over :). This commit fixes that. For heatpumps, ecobee returns: 'coolStages': 1, 'heatStages': 0, 'hasHeatPump': True, Fix tested on HA 100.1 and 100.3 Fixes bug https://github.com/home-assistant/home-assistant/issues/26547 * changed line formatted with black --- homeassistant/components/ecobee/climate.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/ecobee/climate.py b/homeassistant/components/ecobee/climate.py index e29e2381008..c583f9696d2 100644 --- a/homeassistant/components/ecobee/climate.py +++ b/homeassistant/components/ecobee/climate.py @@ -267,7 +267,10 @@ class Thermostat(ClimateDevice): self._last_active_hvac_mode = HVAC_MODE_AUTO self._operation_list = [] - if self.thermostat["settings"]["heatStages"]: + if ( + self.thermostat["settings"]["heatStages"] + or self.thermostat["settings"]["hasHeatPump"] + ): self._operation_list.append(HVAC_MODE_HEAT) if self.thermostat["settings"]["coolStages"]: self._operation_list.append(HVAC_MODE_COOL)