Allow controlling Tado Hot Water Devices with temperature control (#29191)
parent
12155cb66e
commit
392cdf49e6
|
@ -103,6 +103,7 @@ def create_climate_device(tado, hass, zone, name, zone_id):
|
||||||
|
|
||||||
unit = TEMP_CELSIUS
|
unit = TEMP_CELSIUS
|
||||||
ac_device = capabilities["type"] == "AIR_CONDITIONING"
|
ac_device = capabilities["type"] == "AIR_CONDITIONING"
|
||||||
|
hot_water_device = capabilities["type"] == "HOT_WATER"
|
||||||
ac_support_heat = False
|
ac_support_heat = False
|
||||||
|
|
||||||
if ac_device:
|
if ac_device:
|
||||||
|
@ -134,6 +135,7 @@ def create_climate_device(tado, hass, zone, name, zone_id):
|
||||||
hass.config.units.temperature(max_temp, unit),
|
hass.config.units.temperature(max_temp, unit),
|
||||||
step,
|
step,
|
||||||
ac_device,
|
ac_device,
|
||||||
|
hot_water_device,
|
||||||
ac_support_heat,
|
ac_support_heat,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -157,6 +159,7 @@ class TadoClimate(ClimateDevice):
|
||||||
max_temp,
|
max_temp,
|
||||||
step,
|
step,
|
||||||
ac_device,
|
ac_device,
|
||||||
|
hot_water_device,
|
||||||
ac_support_heat,
|
ac_support_heat,
|
||||||
tolerance=0.3,
|
tolerance=0.3,
|
||||||
):
|
):
|
||||||
|
@ -168,6 +171,7 @@ class TadoClimate(ClimateDevice):
|
||||||
self.zone_id = zone_id
|
self.zone_id = zone_id
|
||||||
|
|
||||||
self._ac_device = ac_device
|
self._ac_device = ac_device
|
||||||
|
self._hot_water_device = hot_water_device
|
||||||
self._ac_support_heat = ac_support_heat
|
self._ac_support_heat = ac_support_heat
|
||||||
self._cooling = False
|
self._cooling = False
|
||||||
|
|
||||||
|
@ -519,6 +523,21 @@ class TadoClimate(ClimateDevice):
|
||||||
"AIR_CONDITIONING",
|
"AIR_CONDITIONING",
|
||||||
"COOL",
|
"COOL",
|
||||||
)
|
)
|
||||||
|
elif self._hot_water_device:
|
||||||
|
_LOGGER.info(
|
||||||
|
"Switching mytado.com to %s mode for zone %s (%d). Temp (%s) - HOT_WATER",
|
||||||
|
self._current_operation,
|
||||||
|
self.zone_name,
|
||||||
|
self.zone_id,
|
||||||
|
self._target_temp,
|
||||||
|
)
|
||||||
|
self._store.set_zone_overlay(
|
||||||
|
self.zone_id,
|
||||||
|
self._current_operation,
|
||||||
|
self._target_temp,
|
||||||
|
None,
|
||||||
|
"HOT_WATER",
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
_LOGGER.info(
|
_LOGGER.info(
|
||||||
"Switching mytado.com to %s mode for zone %s (%d). Temp (%s) - HEATING",
|
"Switching mytado.com to %s mode for zone %s (%d). Temp (%s) - HEATING",
|
||||||
|
|
Loading…
Reference in New Issue