Make Nest state reflect current operation not current operation mode

This commit is contained in:
Jeffery Wilson 2016-09-30 01:46:29 -04:00
parent bf30674671
commit 573ba028d8

View file

@ -62,6 +62,15 @@ class NestThermostat(ClimateDevice):
"""Return the unit of measurement."""
return TEMP_CELSIUS
@property
def state(self):
if self.device.hvac_ac_state:
return STATE_COOL
elif self.device.hvac_heater_state:
return STATE_HEAT
else:
return STATE_IDLE
@property
def device_state_attributes(self):
"""Return the device specific state attributes."""