diff --git a/homeassistant/components/thermostat/nest.py b/homeassistant/components/thermostat/nest.py index 06adb49a708eee03d312f15f8df37ea1558050c1..af3b02b2b159395ac179353d6e1d1ddab0a037be 100644 --- a/homeassistant/components/thermostat/nest.py +++ b/homeassistant/components/thermostat/nest.py @@ -74,7 +74,21 @@ class NestThermostat(ThermostatDevice): @property def target_temperature(self): """ Returns the temperature we try to reach. """ - return round(self.device.target, 1) + target = self.device.target + + if isinstance(target, tuple): + low, high = target + + if self.current_temperature < low: + target = low + elif self.current_temperature > high: + target = high + else: + target = low + high + else: + temp = target + + return round(temp, 1) @property def is_away_mode_on(self): diff --git a/requirements.txt b/requirements.txt index 24e1f8ff921c178bda67549034895a6edbb971e7..a0d9266f8508468a0aac4bd1a29d3fc8696438c7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -33,7 +33,7 @@ python-libnmap>=0.6.2 pushbullet.py>=0.7.1 # Nest Thermostat bindings (thermostat.nest) -python-nest>=2.1 +python-nest>=2.3.1 # Z-Wave (*.zwave) pydispatcher>=2.0.5