From ff122b8d4ab6bf6277a5f8013e2994f9e2df93dc Mon Sep 17 00:00:00 2001 From: nhorvath Date: Tue, 5 Feb 2019 10:55:09 -0500 Subject: [PATCH] ecobee: expose detailed equipment status --- homeassistant/components/ecobee/climate.py | 1 + tests/components/ecobee/test_climate.py | 15 ++++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/ecobee/climate.py b/homeassistant/components/ecobee/climate.py index 46fc5c29752..610eb6db501 100644 --- a/homeassistant/components/ecobee/climate.py +++ b/homeassistant/components/ecobee/climate.py @@ -283,6 +283,7 @@ class Thermostat(ClimateDevice): "fan": self.fan, "climate_mode": self.mode, "operation": operation, + "equipment_running": status, "climate_list": self.climate_list, "fan_min_on_time": self.fan_min_on_time } diff --git a/tests/components/ecobee/test_climate.py b/tests/components/ecobee/test_climate.py index 965fb37dcb8..69327fea52f 100644 --- a/tests/components/ecobee/test_climate.py +++ b/tests/components/ecobee/test_climate.py @@ -183,7 +183,8 @@ class TestEcobee(unittest.TestCase): 'fan': 'off', 'fan_min_on_time': 10, 'climate_mode': 'Climate1', - 'operation': 'heat'} == \ + 'operation': 'heat', + 'equipment_running': 'heatPump2'} == \ self.thermostat.device_state_attributes self.ecobee['equipmentStatus'] = 'auxHeat2' @@ -192,7 +193,8 @@ class TestEcobee(unittest.TestCase): 'fan': 'off', 'fan_min_on_time': 10, 'climate_mode': 'Climate1', - 'operation': 'heat'} == \ + 'operation': 'heat', + 'equipment_running': 'auxHeat2'} == \ self.thermostat.device_state_attributes self.ecobee['equipmentStatus'] = 'compCool1' assert {'actual_humidity': 15, @@ -200,7 +202,8 @@ class TestEcobee(unittest.TestCase): 'fan': 'off', 'fan_min_on_time': 10, 'climate_mode': 'Climate1', - 'operation': 'cool'} == \ + 'operation': 'cool', + 'equipment_running': 'compCool1'} == \ self.thermostat.device_state_attributes self.ecobee['equipmentStatus'] = '' assert {'actual_humidity': 15, @@ -208,7 +211,8 @@ class TestEcobee(unittest.TestCase): 'fan': 'off', 'fan_min_on_time': 10, 'climate_mode': 'Climate1', - 'operation': 'idle'} == \ + 'operation': 'idle', + 'equipment_running': ''} == \ self.thermostat.device_state_attributes self.ecobee['equipmentStatus'] = 'Unknown' @@ -217,7 +221,8 @@ class TestEcobee(unittest.TestCase): 'fan': 'off', 'fan_min_on_time': 10, 'climate_mode': 'Climate1', - 'operation': 'Unknown'} == \ + 'operation': 'Unknown', + 'equipment_running': 'Unknown'} == \ self.thermostat.device_state_attributes def test_is_away_mode_on(self):