From 70fc94003d3c2ad92fb97474339a57fc897ef856 Mon Sep 17 00:00:00 2001 From: Marcelo Moreira de Mello Date: Wed, 5 Oct 2016 01:29:21 -0400 Subject: [PATCH] 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 --- homeassistant/components/nest.py | 2 +- homeassistant/components/sensor/nest.py | 5 ++++- requirements_all.txt | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/nest.py b/homeassistant/components/nest.py index d875ab0e2c0..a3d86a725aa 100644 --- a/homeassistant/components/nest.py +++ b/homeassistant/components/nest.py @@ -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' diff --git a/homeassistant/components/sensor/nest.py b/homeassistant/components/sensor/nest.py index 13a97b7be04..135fc22895d 100644 --- a/homeassistant/components/sensor/nest.py +++ b/homeassistant/components/sensor/nest.py @@ -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): diff --git a/requirements_all.txt b/requirements_all.txt index 4ad08b79057..b4ede599c85 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -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