Skip to content

Commit

Permalink
Expose detailed Ecobee equipment status (#20767)
Browse files Browse the repository at this point in the history
* ecobee: expose detailed equipment status

* Fix #18244 for ecobee by moving current_operation property to current_operation_mode which is more accurate and defining current_operation properly, thanks @ZetaPhoenix

* fix docstring and lint issue

* Revert "fix docstring and lint issue"

This reverts commit d3a645f.

* Revert "Fix #18244 for ecobee by moving current_operation property to current_operation_mode which is more accurate and defining current_operation properly, thanks @ZetaPhoenix"

This reverts commit bfd9055.
  • Loading branch information
nhorvath authored and robbiet480 committed Mar 25, 2019
1 parent f272ed3 commit c59d45c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions homeassistant/components/ecobee/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ def device_state_attributes(self):
"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
}
Expand Down
15 changes: 10 additions & 5 deletions tests/components/ecobee/test_climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ def test_device_state_attributes(self):
'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'
Expand All @@ -192,23 +193,26 @@ def test_device_state_attributes(self):
'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,
'climate_list': ['Climate1', 'Climate2'],
'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,
'climate_list': ['Climate1', 'Climate2'],
'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'
Expand All @@ -217,7 +221,8 @@ def test_device_state_attributes(self):
'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):
Expand Down

0 comments on commit c59d45c

Please sign in to comment.