diff --git a/homeassistant/components/climate/tado.py b/homeassistant/components/climate/tado.py index a8054b838ef..25492cb0895 100644 --- a/homeassistant/components/climate/tado.py +++ b/homeassistant/components/climate/tado.py @@ -6,7 +6,7 @@ https://home-assistant.io/components/climate.tado/ """ import logging -from homeassistant.const import TEMP_CELSIUS +from homeassistant.const import (PRECISION_TENTHS, TEMP_CELSIUS) from homeassistant.components.climate import ( ClimateDevice, SUPPORT_TARGET_TEMPERATURE, SUPPORT_OPERATION_MODE) from homeassistant.const import ATTR_TEMPERATURE @@ -192,6 +192,11 @@ class TadoClimate(ClimateDevice): """Return true if away mode is on.""" return self._is_away + @property + def target_temperature_step(self): + """Return the supported step of target temperature.""" + return PRECISION_TENTHS + @property def target_temperature(self): """Return the temperature we try to reach.""" diff --git a/homeassistant/components/sensor/tado.py b/homeassistant/components/sensor/tado.py index 781f2e006d9..8c7259ff800 100644 --- a/homeassistant/components/sensor/tado.py +++ b/homeassistant/components/sensor/tado.py @@ -18,8 +18,10 @@ ATTR_DEVICE = 'device' ATTR_NAME = 'name' ATTR_ZONE = 'zone' -SENSOR_TYPES = ['temperature', 'humidity', 'power', - 'link', 'heating', 'tado mode', 'overlay'] +CLIMATE_SENSOR_TYPES = ['temperature', 'humidity', 'power', + 'link', 'heating', 'tado mode', 'overlay'] + +HOT_WATER_SENSOR_TYPES = ['power', 'link', 'tado mode', 'overlay'] def setup_platform(hass, config, add_devices, discovery_info=None): @@ -35,10 +37,16 @@ def setup_platform(hass, config, add_devices, discovery_info=None): sensor_items = [] for zone in zones: if zone['type'] == 'HEATING': - for variable in SENSOR_TYPES: + for variable in CLIMATE_SENSOR_TYPES: sensor_items.append(create_zone_sensor( tado, zone, zone['name'], zone['id'], variable)) + elif zone['type'] == 'HOT_WATER': + for variable in HOT_WATER_SENSOR_TYPES: + sensor_items.append(create_zone_sensor( + tado, zone, zone['name'], zone['id'], + variable + )) me_data = tado.get_me() sensor_items.append(create_device_sensor(