diff --git a/homeassistant/components/climate/nest.py b/homeassistant/components/climate/nest.py index 36be2ca25f5..c4582b839f3 100644 --- a/homeassistant/components/climate/nest.py +++ b/homeassistant/components/climate/nest.py @@ -40,8 +40,19 @@ class NestThermostat(ClimateDevice): self.structure = structure self.device = device self._fan_list = [STATE_ON, STATE_AUTO] - self._operation_list = [STATE_HEAT, STATE_COOL, STATE_AUTO, - STATE_OFF] + + # Not all nest devices support cooling and heating remove unused + self._operation_list = [STATE_OFF] + + # Add supported nest thermostat features + if self.device.can_heat: + self._operation_list.append(STATE_HEAT) + + if self.device.can_cool: + self._operation_list.append(STATE_COOL) + + if self.device.can_heat and self.device.can_cool: + self._operation_list.append(STATE_AUTO) @property def name(self): @@ -64,11 +75,15 @@ class NestThermostat(ClimateDevice): @property def device_state_attributes(self): """Return the device specific state attributes.""" - # Move these to Thermostat Device and make them global - return { - "humidity": self.device.humidity, - "target_humidity": self.device.target_humidity, - } + if self.device.has_humidifier or self.device.has_dehumidifier: + # Move these to Thermostat Device and make them global + return { + "humidity": self.device.humidity, + "target_humidity": self.device.target_humidity, + } + else: + # No way to control humidity not show setting + return {} @property def current_temperature(self): @@ -164,7 +179,12 @@ class NestThermostat(ClimateDevice): @property def current_fan_mode(self): """Return whether the fan is on.""" - return STATE_ON if self.device.fan else STATE_AUTO + if self.device.has_fan: + # Return whether the fan is on + return STATE_ON if self.device.fan else STATE_AUTO + else: + # No Fan available so disable slider + return None @property def fan_list(self): diff --git a/homeassistant/components/nest.py b/homeassistant/components/nest.py index a3d86a725aa..b8aa1d1c70a 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.10.0'] +REQUIREMENTS = ['python-nest==2.11.0'] DOMAIN = 'nest' diff --git a/requirements_all.txt b/requirements_all.txt index 52c63ad8607..980fb226d7b 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.10.0 +python-nest==2.11.0 # homeassistant.components.device_tracker.nmap_tracker python-nmap==0.6.1