From 9b53b7e9e462f9c626590664d9537aaeb977540b Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Tue, 20 Nov 2018 12:18:46 +0100 Subject: [PATCH] Bump Python-Nest to 4.0.5 (#18580) * Fix Nest eco * Update Python-nest to 4.0.5 * Update requirements_all.txt * Update requirements_test_all.txt --- homeassistant/components/climate/nest.py | 12 +++--------- homeassistant/components/nest/__init__.py | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/homeassistant/components/climate/nest.py b/homeassistant/components/climate/nest.py index bc63512fcf3..e580476e56a 100644 --- a/homeassistant/components/climate/nest.py +++ b/homeassistant/components/climate/nest.py @@ -168,18 +168,14 @@ class NestThermostat(ClimateDevice): @property def target_temperature(self): """Return the temperature we try to reach.""" - if self._mode != NEST_MODE_HEAT_COOL and \ - self._mode != STATE_ECO and \ - not self.is_away_mode_on: + if self._mode not in (NEST_MODE_HEAT_COOL, STATE_ECO): return self._target_temperature return None @property def target_temperature_low(self): """Return the lower bound temperature we try to reach.""" - if (self.is_away_mode_on or self._mode == STATE_ECO) and \ - self._eco_temperature[0]: - # eco_temperature is always a low, high tuple + if self._mode == STATE_ECO: return self._eco_temperature[0] if self._mode == NEST_MODE_HEAT_COOL: return self._target_temperature[0] @@ -188,9 +184,7 @@ class NestThermostat(ClimateDevice): @property def target_temperature_high(self): """Return the upper bound temperature we try to reach.""" - if (self.is_away_mode_on or self._mode == STATE_ECO) and \ - self._eco_temperature[1]: - # eco_temperature is always a low, high tuple + if self._mode == STATE_ECO: return self._eco_temperature[1] if self._mode == NEST_MODE_HEAT_COOL: return self._target_temperature[1] diff --git a/homeassistant/components/nest/__init__.py b/homeassistant/components/nest/__init__.py index 5f584d20c55..5bbd36f4b9d 100644 --- a/homeassistant/components/nest/__init__.py +++ b/homeassistant/components/nest/__init__.py @@ -27,7 +27,7 @@ from homeassistant.helpers.entity import Entity from .const import DOMAIN from . import local_auth -REQUIREMENTS = ['python-nest==4.0.4'] +REQUIREMENTS = ['python-nest==4.0.5'] _CONFIGURING = {} _LOGGER = logging.getLogger(__name__) diff --git a/requirements_all.txt b/requirements_all.txt index baa41f0b7dd..d097c14a701 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1222,7 +1222,7 @@ python-mpd2==1.0.0 python-mystrom==0.4.4 # homeassistant.components.nest -python-nest==4.0.4 +python-nest==4.0.5 # homeassistant.components.device_tracker.nmap_tracker python-nmap==0.6.1 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 0ff8df5e811..4ed7510cae0 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -196,7 +196,7 @@ pyspcwebgw==0.4.0 python-forecastio==1.4.0 # homeassistant.components.nest -python-nest==4.0.4 +python-nest==4.0.5 # homeassistant.components.sensor.whois pythonwhois==2.4.3