Fixed issue #3624 and bumped python-nest to 2.10.0 version (#3665)

* Fixed issue #3624 and bumped python-nest to 2.10.0 version

*    Fixed return state when accessing attribute operation_mode

* Fixed typo
This commit is contained in:
Marcelo Moreira de Mello 2016-10-05 01:29:21 -04:00 committed by Paulus Schoutsen
parent 4f0064b00e
commit 70fc94003d
3 changed files with 6 additions and 3 deletions

View File

@ -14,7 +14,7 @@ from homeassistant.const import (CONF_PASSWORD, CONF_USERNAME, CONF_STRUCTURE)
_LOGGER = logging.getLogger(__name__)
REQUIREMENTS = ['python-nest==2.9.2']
REQUIREMENTS = ['python-nest==2.10.0']
DOMAIN = 'nest'

View File

@ -109,7 +109,10 @@ class NestBasicSensor(NestSensor):
@property
def state(self):
"""Return the state of the sensor."""
return getattr(self.device, self.variable)
if self.variable == 'operation_mode':
return getattr(self.device, "mode")
else:
return getattr(self.device, self.variable)
@property
def unit_of_measurement(self):

View File

@ -389,7 +389,7 @@ python-mpd2==0.5.5
python-mystrom==0.3.6
# homeassistant.components.nest
python-nest==2.9.2
python-nest==2.10.0
# homeassistant.components.device_tracker.nmap_tracker
python-nmap==0.6.1