Update python-wink version and multiple wink fixes/updates. (#11833)

This commit is contained in:
William Scanlon 2018-01-25 11:31:38 -05:00 committed by GitHub
parent 3d9ff372fc
commit 5123487705
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 42 additions and 10 deletions

View file

@ -30,6 +30,8 @@ ATTR_SCHEDULE_ENABLED = 'schedule_enabled'
ATTR_SMART_TEMPERATURE = 'smart_temperature'
ATTR_TOTAL_CONSUMPTION = 'total_consumption'
ATTR_VACATION_MODE = 'vacation_mode'
ATTR_HEAT_ON = 'heat_on'
ATTR_COOL_ON = 'cool_on'
DEPENDENCIES = ['wink']
@ -131,6 +133,12 @@ class WinkThermostat(WinkDevice, ClimateDevice):
if self.eco_target:
data[ATTR_ECO_TARGET] = self.eco_target
if self.heat_on:
data[ATTR_HEAT_ON] = self.heat_on
if self.cool_on:
data[ATTR_COOL_ON] = self.cool_on
current_humidity = self.current_humidity
if current_humidity is not None:
data[ATTR_CURRENT_HUMIDITY] = current_humidity
@ -174,6 +182,16 @@ class WinkThermostat(WinkDevice, ClimateDevice):
"""Return status of if the thermostat has detected occupancy."""
return self.wink.occupied()
@property
def heat_on(self):
"""Return whether or not the heat is actually heating."""
return self.wink.heat_on()
@property
def cool_on(self):
"""Return whether or not the heat is actually heating."""
return self.wink.heat_on()
@property
def current_operation(self):
"""Return current operation ie. heat, cool, idle."""