diff --git a/homeassistant/components/climate/__init__.py b/homeassistant/components/climate/__init__.py index 726ed4f674c..f670cbc45e1 100644 --- a/homeassistant/components/climate/__init__.py +++ b/homeassistant/components/climate/__init__.py @@ -235,10 +235,17 @@ def setup(hass, config): def temperature_set_service(service): """Set temperature on the target climate devices.""" target_climate = component.extract_from_service(service) - kwargs = service.data - for climate in target_climate: - climate.set_temperature(**kwargs) + for climate in target_climate: + kwargs = {} + for value, temp in service.data.items(): + kwargs[value] = convert_temperature( + temp, + hass.config.units.temperature_unit, + climate.unit_of_measurement + ) + + climate.set_temperature(**kwargs) if climate.should_poll: climate.update_ha_state(True) diff --git a/homeassistant/components/climate/nest.py b/homeassistant/components/climate/nest.py index 2884f4d2eb2..36be2ca25f5 100644 --- a/homeassistant/components/climate/nest.py +++ b/homeassistant/components/climate/nest.py @@ -13,7 +13,6 @@ from homeassistant.components.climate import ( ATTR_TEMPERATURE) from homeassistant.const import ( TEMP_CELSIUS, CONF_SCAN_INTERVAL, STATE_ON, STATE_OFF, STATE_UNKNOWN) -from homeassistant.util.temperature import convert as convert_temperature DEPENDENCIES = ['nest'] _LOGGER = logging.getLogger(__name__) @@ -127,12 +126,9 @@ class NestThermostat(ClimateDevice): def set_temperature(self, **kwargs): """Set new target temperature.""" - if kwargs.get(ATTR_TARGET_TEMP_LOW) is not None and \ - kwargs.get(ATTR_TARGET_TEMP_HIGH) is not None: - target_temp_high = convert_temperature(kwargs.get( - ATTR_TARGET_TEMP_HIGH), self._unit, TEMP_CELSIUS) - target_temp_low = convert_temperature(kwargs.get( - ATTR_TARGET_TEMP_LOW), self._unit, TEMP_CELSIUS) + target_temp_low = kwargs.get(ATTR_TARGET_TEMP_LOW) + target_temp_high = kwargs.get(ATTR_TARGET_TEMP_HIGH) + if target_temp_low is not None and target_temp_high is not None: if self.device.mode == 'range': temp = (target_temp_low, target_temp_high)