2019-12-20 12:24:43 +00:00
|
|
|
"""Support for Tado thermostats."""
|
2017-03-22 12:18:13 +00:00
|
|
|
import logging
|
|
|
|
|
2020-07-05 19:43:52 +00:00
|
|
|
import voluptuous as vol
|
|
|
|
|
2020-04-25 16:04:03 +00:00
|
|
|
from homeassistant.components.climate import ClimateEntity
|
2019-02-14 19:34:43 +00:00
|
|
|
from homeassistant.components.climate.const import (
|
2019-11-24 21:47:31 +00:00
|
|
|
CURRENT_HVAC_OFF,
|
2020-03-30 14:06:26 +00:00
|
|
|
FAN_AUTO,
|
2019-11-24 21:47:31 +00:00
|
|
|
HVAC_MODE_HEAT,
|
2020-03-10 08:32:56 +00:00
|
|
|
HVAC_MODE_OFF,
|
2019-07-31 19:25:30 +00:00
|
|
|
PRESET_AWAY,
|
2019-08-12 04:02:16 +00:00
|
|
|
PRESET_HOME,
|
2020-03-30 14:06:26 +00:00
|
|
|
SUPPORT_FAN_MODE,
|
2019-07-31 19:25:30 +00:00
|
|
|
SUPPORT_PRESET_MODE,
|
2020-03-31 22:29:45 +00:00
|
|
|
SUPPORT_SWING_MODE,
|
2019-07-31 19:25:30 +00:00
|
|
|
SUPPORT_TARGET_TEMPERATURE,
|
|
|
|
)
|
2020-04-12 18:42:36 +00:00
|
|
|
from homeassistant.config_entries import ConfigEntry
|
2019-07-31 19:25:30 +00:00
|
|
|
from homeassistant.const import ATTR_TEMPERATURE, PRECISION_TENTHS, TEMP_CELSIUS
|
2020-04-12 18:42:36 +00:00
|
|
|
from homeassistant.core import HomeAssistant, callback
|
2020-07-05 19:43:52 +00:00
|
|
|
from homeassistant.helpers import config_validation as cv, entity_platform
|
2019-12-20 12:24:43 +00:00
|
|
|
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
|
|
|
|
|
|
|
from .const import (
|
2020-03-30 14:06:26 +00:00
|
|
|
CONST_FAN_AUTO,
|
|
|
|
CONST_FAN_OFF,
|
|
|
|
CONST_MODE_AUTO,
|
|
|
|
CONST_MODE_COOL,
|
|
|
|
CONST_MODE_HEAT,
|
2019-12-20 12:24:43 +00:00
|
|
|
CONST_MODE_OFF,
|
|
|
|
CONST_MODE_SMART_SCHEDULE,
|
|
|
|
CONST_OVERLAY_MANUAL,
|
|
|
|
CONST_OVERLAY_TADO_MODE,
|
2020-07-05 19:43:52 +00:00
|
|
|
CONST_OVERLAY_TIMER,
|
2020-02-15 16:08:21 +00:00
|
|
|
DATA,
|
2020-04-12 18:42:36 +00:00
|
|
|
DOMAIN,
|
2020-03-30 14:06:26 +00:00
|
|
|
HA_TO_TADO_FAN_MODE_MAP,
|
|
|
|
HA_TO_TADO_HVAC_MODE_MAP,
|
|
|
|
ORDERED_KNOWN_TADO_MODES,
|
2020-04-12 18:42:36 +00:00
|
|
|
SIGNAL_TADO_UPDATE_RECEIVED,
|
2020-03-30 14:06:26 +00:00
|
|
|
SUPPORT_PRESET,
|
|
|
|
TADO_HVAC_ACTION_TO_HA_HVAC_ACTION,
|
|
|
|
TADO_MODES_WITH_NO_TEMP_SETTING,
|
2020-03-31 22:29:45 +00:00
|
|
|
TADO_SWING_OFF,
|
2020-04-19 10:17:06 +00:00
|
|
|
TADO_SWING_ON,
|
2020-03-30 14:06:26 +00:00
|
|
|
TADO_TO_HA_FAN_MODE_MAP,
|
|
|
|
TADO_TO_HA_HVAC_MODE_MAP,
|
2021-01-26 08:11:29 +00:00
|
|
|
TADO_TO_HA_OFFSET_MAP,
|
|
|
|
TEMP_OFFSET,
|
2019-12-20 12:24:43 +00:00
|
|
|
TYPE_AIR_CONDITIONING,
|
2020-02-15 16:08:21 +00:00
|
|
|
TYPE_HEATING,
|
2019-12-20 12:24:43 +00:00
|
|
|
)
|
2020-04-12 18:42:36 +00:00
|
|
|
from .entity import TadoZoneEntity
|
2017-03-22 12:18:13 +00:00
|
|
|
|
2017-03-26 13:50:40 +00:00
|
|
|
_LOGGER = logging.getLogger(__name__)
|
2017-03-22 12:18:13 +00:00
|
|
|
|
2020-07-05 19:43:52 +00:00
|
|
|
SERVICE_CLIMATE_TIMER = "set_climate_timer"
|
|
|
|
ATTR_TIME_PERIOD = "time_period"
|
|
|
|
|
|
|
|
CLIMATE_TIMER_SCHEMA = {
|
|
|
|
vol.Required(ATTR_TIME_PERIOD, default="01:00:00"): vol.All(
|
|
|
|
cv.time_period, cv.positive_timedelta, lambda td: td.total_seconds()
|
|
|
|
),
|
|
|
|
vol.Required(ATTR_TEMPERATURE): vol.Coerce(float),
|
|
|
|
}
|
|
|
|
|
2021-01-26 08:11:29 +00:00
|
|
|
SERVICE_TEMP_OFFSET = "set_climate_temperature_offset"
|
|
|
|
ATTR_OFFSET = "offset"
|
|
|
|
|
|
|
|
CLIMATE_TEMP_OFFSET_SCHEMA = {
|
|
|
|
vol.Required(ATTR_OFFSET, default=0): vol.Coerce(float),
|
|
|
|
}
|
|
|
|
|
2017-03-22 12:18:13 +00:00
|
|
|
|
2020-04-12 18:42:36 +00:00
|
|
|
async def async_setup_entry(
|
|
|
|
hass: HomeAssistant, entry: ConfigEntry, async_add_entities
|
|
|
|
):
|
2017-03-26 13:50:40 +00:00
|
|
|
"""Set up the Tado climate platform."""
|
2020-02-15 16:08:21 +00:00
|
|
|
|
2020-04-12 18:42:36 +00:00
|
|
|
tado = hass.data[DOMAIN][entry.entry_id][DATA]
|
|
|
|
entities = await hass.async_add_executor_job(_generate_entities, tado)
|
2017-03-22 12:18:13 +00:00
|
|
|
|
2021-05-03 16:34:28 +00:00
|
|
|
platform = entity_platform.async_get_current_platform()
|
2020-07-05 19:43:52 +00:00
|
|
|
|
|
|
|
platform.async_register_entity_service(
|
2020-08-27 11:56:20 +00:00
|
|
|
SERVICE_CLIMATE_TIMER,
|
|
|
|
CLIMATE_TIMER_SCHEMA,
|
|
|
|
"set_timer",
|
2020-07-05 19:43:52 +00:00
|
|
|
)
|
|
|
|
|
2021-01-26 08:11:29 +00:00
|
|
|
platform.async_register_entity_service(
|
|
|
|
SERVICE_TEMP_OFFSET,
|
|
|
|
CLIMATE_TEMP_OFFSET_SCHEMA,
|
|
|
|
"set_temp_offset",
|
|
|
|
)
|
|
|
|
|
2019-12-20 12:24:43 +00:00
|
|
|
if entities:
|
2020-04-12 18:42:36 +00:00
|
|
|
async_add_entities(entities, True)
|
|
|
|
|
|
|
|
|
|
|
|
def _generate_entities(tado):
|
|
|
|
"""Create all climate entities."""
|
|
|
|
entities = []
|
|
|
|
for zone in tado.zones:
|
|
|
|
if zone["type"] in [TYPE_HEATING, TYPE_AIR_CONDITIONING]:
|
2021-01-26 08:11:29 +00:00
|
|
|
entity = create_climate_entity(
|
|
|
|
tado, zone["name"], zone["id"], zone["devices"][0]
|
|
|
|
)
|
2020-04-12 18:42:36 +00:00
|
|
|
if entity:
|
|
|
|
entities.append(entity)
|
|
|
|
return entities
|
2017-03-22 12:18:13 +00:00
|
|
|
|
|
|
|
|
2021-01-26 08:11:29 +00:00
|
|
|
def create_climate_entity(tado, name: str, zone_id: int, device_info: dict):
|
2019-12-20 12:24:43 +00:00
|
|
|
"""Create a Tado climate entity."""
|
2017-03-22 12:18:13 +00:00
|
|
|
capabilities = tado.get_capabilities(zone_id)
|
2019-12-20 12:24:43 +00:00
|
|
|
_LOGGER.debug("Capabilities for zone %s: %s", zone_id, capabilities)
|
2017-03-22 12:18:13 +00:00
|
|
|
|
2019-12-20 12:24:43 +00:00
|
|
|
zone_type = capabilities["type"]
|
2020-03-30 14:06:26 +00:00
|
|
|
support_flags = SUPPORT_PRESET_MODE | SUPPORT_TARGET_TEMPERATURE
|
|
|
|
supported_hvac_modes = [
|
|
|
|
TADO_TO_HA_HVAC_MODE_MAP[CONST_MODE_OFF],
|
|
|
|
TADO_TO_HA_HVAC_MODE_MAP[CONST_MODE_SMART_SCHEDULE],
|
|
|
|
]
|
|
|
|
supported_fan_modes = None
|
|
|
|
heat_temperatures = None
|
|
|
|
cool_temperatures = None
|
2019-08-12 04:02:16 +00:00
|
|
|
|
2019-12-20 12:24:43 +00:00
|
|
|
if zone_type == TYPE_AIR_CONDITIONING:
|
2019-08-12 04:02:16 +00:00
|
|
|
# Heat is preferred as it generally has a lower minimum temperature
|
2020-03-30 14:06:26 +00:00
|
|
|
for mode in ORDERED_KNOWN_TADO_MODES:
|
|
|
|
if mode not in capabilities:
|
|
|
|
continue
|
|
|
|
|
|
|
|
supported_hvac_modes.append(TADO_TO_HA_HVAC_MODE_MAP[mode])
|
2020-03-31 22:29:45 +00:00
|
|
|
if capabilities[mode].get("swings"):
|
|
|
|
support_flags |= SUPPORT_SWING_MODE
|
|
|
|
|
2020-03-30 14:06:26 +00:00
|
|
|
if not capabilities[mode].get("fanSpeeds"):
|
|
|
|
continue
|
|
|
|
|
|
|
|
support_flags |= SUPPORT_FAN_MODE
|
|
|
|
|
|
|
|
if supported_fan_modes:
|
|
|
|
continue
|
|
|
|
|
|
|
|
supported_fan_modes = [
|
|
|
|
TADO_TO_HA_FAN_MODE_MAP[speed]
|
|
|
|
for speed in capabilities[mode]["fanSpeeds"]
|
|
|
|
]
|
|
|
|
|
|
|
|
cool_temperatures = capabilities[CONST_MODE_COOL]["temperatures"]
|
2017-12-04 13:55:04 +00:00
|
|
|
else:
|
2020-03-30 14:06:26 +00:00
|
|
|
supported_hvac_modes.append(HVAC_MODE_HEAT)
|
|
|
|
|
|
|
|
if CONST_MODE_HEAT in capabilities:
|
|
|
|
heat_temperatures = capabilities[CONST_MODE_HEAT]["temperatures"]
|
|
|
|
|
|
|
|
if heat_temperatures is None and "temperatures" in capabilities:
|
|
|
|
heat_temperatures = capabilities["temperatures"]
|
|
|
|
|
|
|
|
if cool_temperatures is None and heat_temperatures is None:
|
|
|
|
_LOGGER.debug("Not adding zone %s since it has no temperatures", name)
|
2019-12-20 12:24:43 +00:00
|
|
|
return None
|
2017-06-23 16:45:44 +00:00
|
|
|
|
2020-03-30 14:06:26 +00:00
|
|
|
heat_min_temp = None
|
|
|
|
heat_max_temp = None
|
|
|
|
heat_step = None
|
|
|
|
cool_min_temp = None
|
|
|
|
cool_max_temp = None
|
|
|
|
cool_step = None
|
|
|
|
|
|
|
|
if heat_temperatures is not None:
|
|
|
|
heat_min_temp = float(heat_temperatures["celsius"]["min"])
|
|
|
|
heat_max_temp = float(heat_temperatures["celsius"]["max"])
|
|
|
|
heat_step = heat_temperatures["celsius"].get("step", PRECISION_TENTHS)
|
|
|
|
|
|
|
|
if cool_temperatures is not None:
|
|
|
|
cool_min_temp = float(cool_temperatures["celsius"]["min"])
|
|
|
|
cool_max_temp = float(cool_temperatures["celsius"]["max"])
|
|
|
|
cool_step = cool_temperatures["celsius"].get("step", PRECISION_TENTHS)
|
2019-07-31 19:25:30 +00:00
|
|
|
|
2019-12-20 12:24:43 +00:00
|
|
|
entity = TadoClimate(
|
2020-03-30 14:06:26 +00:00
|
|
|
tado,
|
|
|
|
name,
|
|
|
|
zone_id,
|
|
|
|
zone_type,
|
|
|
|
heat_min_temp,
|
|
|
|
heat_max_temp,
|
|
|
|
heat_step,
|
|
|
|
cool_min_temp,
|
|
|
|
cool_max_temp,
|
|
|
|
cool_step,
|
|
|
|
supported_hvac_modes,
|
|
|
|
supported_fan_modes,
|
|
|
|
support_flags,
|
2021-01-26 08:11:29 +00:00
|
|
|
device_info,
|
2019-07-31 19:25:30 +00:00
|
|
|
)
|
2019-12-20 12:24:43 +00:00
|
|
|
return entity
|
2017-03-22 12:18:13 +00:00
|
|
|
|
|
|
|
|
2020-04-25 16:04:03 +00:00
|
|
|
class TadoClimate(TadoZoneEntity, ClimateEntity):
|
2019-12-20 12:24:43 +00:00
|
|
|
"""Representation of a Tado climate entity."""
|
2017-03-22 12:18:13 +00:00
|
|
|
|
2019-07-31 19:25:30 +00:00
|
|
|
def __init__(
|
|
|
|
self,
|
2019-12-20 12:24:43 +00:00
|
|
|
tado,
|
2019-07-31 19:25:30 +00:00
|
|
|
zone_name,
|
|
|
|
zone_id,
|
2019-12-20 12:24:43 +00:00
|
|
|
zone_type,
|
2020-03-30 14:06:26 +00:00
|
|
|
heat_min_temp,
|
|
|
|
heat_max_temp,
|
|
|
|
heat_step,
|
|
|
|
cool_min_temp,
|
|
|
|
cool_max_temp,
|
|
|
|
cool_step,
|
|
|
|
supported_hvac_modes,
|
|
|
|
supported_fan_modes,
|
|
|
|
support_flags,
|
2021-01-26 08:11:29 +00:00
|
|
|
device_info,
|
2019-07-31 19:25:30 +00:00
|
|
|
):
|
2019-12-20 12:24:43 +00:00
|
|
|
"""Initialize of Tado climate entity."""
|
|
|
|
self._tado = tado
|
2020-12-28 13:57:51 +00:00
|
|
|
super().__init__(zone_name, tado.home_id, zone_id)
|
2017-03-22 12:18:13 +00:00
|
|
|
|
|
|
|
self.zone_id = zone_id
|
2019-12-20 12:24:43 +00:00
|
|
|
self.zone_type = zone_type
|
2020-12-28 13:57:51 +00:00
|
|
|
self._unique_id = f"{zone_type} {zone_id} {tado.home_id}"
|
2021-01-26 08:11:29 +00:00
|
|
|
self._device_info = device_info
|
|
|
|
self._device_id = self._device_info["shortSerialNo"]
|
2017-03-22 12:18:13 +00:00
|
|
|
|
2019-12-20 12:24:43 +00:00
|
|
|
self._ac_device = zone_type == TYPE_AIR_CONDITIONING
|
2020-03-30 14:06:26 +00:00
|
|
|
self._supported_hvac_modes = supported_hvac_modes
|
|
|
|
self._supported_fan_modes = supported_fan_modes
|
|
|
|
self._support_flags = support_flags
|
2017-03-22 12:18:13 +00:00
|
|
|
|
2020-03-30 14:06:26 +00:00
|
|
|
self._available = False
|
2017-03-22 12:18:13 +00:00
|
|
|
|
|
|
|
self._cur_temp = None
|
|
|
|
self._cur_humidity = None
|
2020-03-30 14:06:26 +00:00
|
|
|
|
|
|
|
self._heat_min_temp = heat_min_temp
|
|
|
|
self._heat_max_temp = heat_max_temp
|
|
|
|
self._heat_step = heat_step
|
|
|
|
|
|
|
|
self._cool_min_temp = cool_min_temp
|
|
|
|
self._cool_max_temp = cool_max_temp
|
|
|
|
self._cool_step = cool_step
|
|
|
|
|
2017-03-22 12:18:13 +00:00
|
|
|
self._target_temp = None
|
2019-12-20 12:24:43 +00:00
|
|
|
|
2020-03-30 14:06:26 +00:00
|
|
|
self._current_tado_fan_speed = CONST_FAN_OFF
|
|
|
|
self._current_tado_hvac_mode = CONST_MODE_OFF
|
|
|
|
self._current_tado_hvac_action = CURRENT_HVAC_OFF
|
2020-03-31 22:29:45 +00:00
|
|
|
self._current_tado_swing_mode = TADO_SWING_OFF
|
2017-03-22 12:18:13 +00:00
|
|
|
|
2020-03-30 14:06:26 +00:00
|
|
|
self._tado_zone_data = None
|
2020-04-12 18:42:36 +00:00
|
|
|
|
2021-01-26 08:11:29 +00:00
|
|
|
self._tado_zone_temp_offset = {}
|
|
|
|
|
2020-03-30 14:06:26 +00:00
|
|
|
self._async_update_zone_data()
|
|
|
|
|
2019-12-20 12:24:43 +00:00
|
|
|
async def async_added_to_hass(self):
|
|
|
|
"""Register for sensor updates."""
|
|
|
|
|
2020-04-18 22:39:43 +00:00
|
|
|
self.async_on_remove(
|
|
|
|
async_dispatcher_connect(
|
|
|
|
self.hass,
|
|
|
|
SIGNAL_TADO_UPDATE_RECEIVED.format(
|
2020-12-28 13:57:51 +00:00
|
|
|
self._tado.home_id, "zone", self.zone_id
|
2020-04-18 22:39:43 +00:00
|
|
|
),
|
|
|
|
self._async_update_callback,
|
|
|
|
)
|
2019-12-20 12:24:43 +00:00
|
|
|
)
|
|
|
|
|
2017-11-29 10:01:28 +00:00
|
|
|
@property
|
|
|
|
def supported_features(self):
|
|
|
|
"""Return the list of supported features."""
|
2020-03-30 14:06:26 +00:00
|
|
|
return self._support_flags
|
2017-11-29 10:01:28 +00:00
|
|
|
|
2017-03-22 12:18:13 +00:00
|
|
|
@property
|
|
|
|
def name(self):
|
2019-12-20 12:24:43 +00:00
|
|
|
"""Return the name of the entity."""
|
2017-03-22 12:18:13 +00:00
|
|
|
return self.zone_name
|
|
|
|
|
2020-02-11 16:46:02 +00:00
|
|
|
@property
|
|
|
|
def unique_id(self):
|
|
|
|
"""Return the unique id."""
|
|
|
|
return self._unique_id
|
|
|
|
|
2019-12-20 12:24:43 +00:00
|
|
|
@property
|
2017-03-22 12:18:13 +00:00
|
|
|
def current_humidity(self):
|
|
|
|
"""Return the current humidity."""
|
2020-03-30 14:06:26 +00:00
|
|
|
return self._tado_zone_data.current_humidity
|
2017-03-22 12:18:13 +00:00
|
|
|
|
|
|
|
@property
|
|
|
|
def current_temperature(self):
|
|
|
|
"""Return the sensor temperature."""
|
2020-03-30 14:06:26 +00:00
|
|
|
return self._tado_zone_data.current_temp
|
2017-03-22 12:18:13 +00:00
|
|
|
|
|
|
|
@property
|
Climate 1.0 (#23899)
* Climate 1.0 / part 1/2/3
* fix flake
* Lint
* Update Google Assistant
* ambiclimate to climate 1.0 (#24911)
* Fix Alexa
* Lint
* Migrate zhong_hong
* Migrate tuya
* Migrate honeywell to new climate schema (#24257)
* Update one
* Fix model climate v2
* Cleanup p4
* Add comfort hold mode
* Fix old code
* Update homeassistant/components/climate/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/components/climate/const.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* First renaming
* Rename operation to hvac for paulus
* Rename hold mode to preset mode
* Cleanup & update comments
* Remove on/off
* Fix supported feature count
* Update services
* Update demo
* Fix tests & use current_hvac
* Update comment
* Fix tests & add typing
* Add more typing
* Update modes
* Fix tests
* Cleanup low/high with range
* Update homematic part 1
* Finish homematic
* Fix lint
* fix hm mapping
* Support simple devices
* convert lcn
* migrate oem
* Fix xs1
* update hive
* update mil
* Update toon
* migrate deconz
* cleanup
* update tesla
* Fix lint
* Fix vera
* Migrate zwave
* Migrate velbus
* Cleanup humity feature
* Cleanup
* Migrate wink
* migrate dyson
* Fix current hvac
* Renaming
* Fix lint
* Migrate tfiac
* migrate tado
* Fix PRESET can be None
* apply PR#23913 from dev
* remove EU component, etc.
* remove EU component, etc.
* ready to test now
* de-linted
* some tweaks
* de-lint
* better handling of edge cases
* delint
* fix set_mode typos
* apply PR#23913 from dev
* remove EU component, etc.
* ready to test now
* de-linted
* some tweaks
* de-lint
* better handling of edge cases
* delint
* fix set_mode typos
* delint, move debug code
* away preset now working
* code tidy-up
* code tidy-up 2
* code tidy-up 3
* address issues #18932, #15063
* address issues #18932, #15063 - 2/2
* refactor MODE_AUTO to MODE_HEAT_COOL and use F not C
* add low/high to set_temp
* add low/high to set_temp 2
* add low/high to set_temp - delint
* run HA scripts
* port changes from PR #24402
* manual rebase
* manual rebase 2
* delint
* minor change
* remove SUPPORT_HVAC_ACTION
* Migrate radiotherm
* Convert touchline
* Migrate flexit
* Migrate nuheat
* Migrate maxcube
* Fix names maxcube const
* Migrate proliphix
* Migrate heatmiser
* Migrate fritzbox
* Migrate opentherm_gw
* Migrate venstar
* Migrate daikin
* Migrate modbus
* Fix elif
* Migrate Homematic IP Cloud to climate-1.0 (#24913)
* hmip climate fix
* Update hvac_mode and preset_mode
* fix lint
* Fix lint
* Migrate generic_thermostat
* Migrate incomfort to new climate schema (#24915)
* initial commit
* Update climate.py
* Migrate eq3btsmart
* Lint
* cleanup PRESET_MANUAL
* Migrate ecobee
* No conditional features
* KNX: Migrate climate component to new climate platform (#24931)
* Migrate climate component
* Remove unused code
* Corrected line length
* Lint
* Lint
* fix tests
* Fix value
* Migrate geniushub to new climate schema (#24191)
* Update one
* Fix model climate v2
* Cleanup p4
* Add comfort hold mode
* Fix old code
* Update homeassistant/components/climate/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/components/climate/const.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* First renaming
* Rename operation to hvac for paulus
* Rename hold mode to preset mode
* Cleanup & update comments
* Remove on/off
* Fix supported feature count
* Update services
* Update demo
* Fix tests & use current_hvac
* Update comment
* Fix tests & add typing
* Add more typing
* Update modes
* Fix tests
* Cleanup low/high with range
* Update homematic part 1
* Finish homematic
* Fix lint
* fix hm mapping
* Support simple devices
* convert lcn
* migrate oem
* Fix xs1
* update hive
* update mil
* Update toon
* migrate deconz
* cleanup
* update tesla
* Fix lint
* Fix vera
* Migrate zwave
* Migrate velbus
* Cleanup humity feature
* Cleanup
* Migrate wink
* migrate dyson
* Fix current hvac
* Renaming
* Fix lint
* Migrate tfiac
* migrate tado
* delinted
* delinted
* use latest client
* clean up mappings
* clean up mappings
* add duration to set_temperature
* add duration to set_temperature
* manual rebase
* tweak
* fix regression
* small fix
* fix rebase mixup
* address comments
* finish refactor
* fix regression
* tweak type hints
* delint
* manual rebase
* WIP: Fixes for honeywell migration to climate-1.0 (#24938)
* add type hints
* code tidy-up
* Fixes for incomfort migration to climate-1.0 (#24936)
* delint type hints
* no async unless await
* revert: no async unless await
* revert: no async unless await 2
* delint
* fix typo
* Fix homekit_controller on climate-1.0 (#24948)
* Fix tests on climate-1.0 branch
* As part of climate-1.0, make state return the heating-cooling.current characteristic
* Fixes from review
* lint
* Fix imports
* Migrate stibel_eltron
* Fix lint
* Migrate coolmaster to climate 1.0 (#24967)
* Migrate coolmaster to climate 1.0
* fix lint errors
* More lint fixes
* Fix demo to work with UI
* Migrate spider
* Demo update
* Updated frontend to 20190705.0
* Fix boost mode (#24980)
* Prepare Netatmo for climate 1.0 (#24973)
* Migration Netatmo
* Address comments
* Update climate.py
* Migrate ephember
* Migrate Sensibo
* Implemented review comments (#24942)
* Migrate ESPHome
* Migrate MQTT
* Migrate Nest
* Migrate melissa
* Initial/partial migration of ST
* Migrate ST
* Remove Away mode (#24995)
* Migrate evohome, cache access tokens (#24491)
* add water_heater, add storage - initial commit
* add water_heater, add storage - initial commit
delint
add missing code
desiderata
update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
delint
* Add Broker, Water Heater & Refactor
add missing code
desiderata
* update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
* bugfix - loc_idx may not be 0
more refactor - ensure pure async
more refactoring
appears all r/o attributes are working
tweak precsion, DHW & delint
remove unused code
remove unused code 2
remove unused code, refactor _save_auth_tokens()
* support RoundThermostat
bugfix opmode, switch to util.dt, add until=1h
revert breaking change
* store at_expires as naive UTC
remove debug code
delint
tidy up exception handling
delint
add water_heater, add storage - initial commit
delint
add missing code
desiderata
update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
add water_heater, add storage - initial commit
delint
add missing code
desiderata
update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
delint
bugfix - loc_idx may not be 0
more refactor - ensure pure async
more refactoring
appears all r/o attributes are working
tweak precsion, DHW & delint
remove unused code
remove unused code 2
remove unused code, refactor _save_auth_tokens()
support RoundThermostat
bugfix opmode, switch to util.dt, add until=1h
revert breaking change
store at_expires as naive UTC
remove debug code
delint
tidy up exception handling
delint
* update CODEOWNERS
* fix regression
* fix requirements
* migrate to climate-1.0
* tweaking
* de-lint
* TCS working? & delint
* tweaking
* TCS code finalised
* remove available() logic
* refactor _switchpoints()
* tidy up switchpoint code
* tweak
* teaking device_state_attributes
* some refactoring
* move PRESET_CUSTOM back to evohome
* move CONF_ACCESS_TOKEN_EXPIRES CONF_REFRESH_TOKEN back to evohome
* refactor SP code and dt conversion
* delinted
* delinted
* remove water_heater
* fix regression
* Migrate homekit
* Cleanup away mode
* Fix tests
* add helpers
* fix tests melissa
* Fix nehueat
* fix zwave
* add more tests
* fix deconz
* Fix climate test emulate_hue
* fix tests
* fix dyson tests
* fix demo with new layout
* fix honeywell
* Switch homekit_controller to use HVAC_MODE_HEAT_COOL instead of HVAC_MODE_AUTO (#25009)
* Lint
* PyLint
* Pylint
* fix fritzbox tests
* Fix google
* Fix all tests
* Fix lint
* Fix auto for homekit like controler
* Fix lint
* fix lint
2019-07-08 12:00:24 +00:00
|
|
|
def hvac_mode(self):
|
|
|
|
"""Return hvac operation ie. heat, cool mode.
|
|
|
|
|
|
|
|
Need to be one of HVAC_MODE_*.
|
|
|
|
"""
|
2020-03-30 14:06:26 +00:00
|
|
|
return TADO_TO_HA_HVAC_MODE_MAP.get(self._current_tado_hvac_mode, HVAC_MODE_OFF)
|
Climate 1.0 (#23899)
* Climate 1.0 / part 1/2/3
* fix flake
* Lint
* Update Google Assistant
* ambiclimate to climate 1.0 (#24911)
* Fix Alexa
* Lint
* Migrate zhong_hong
* Migrate tuya
* Migrate honeywell to new climate schema (#24257)
* Update one
* Fix model climate v2
* Cleanup p4
* Add comfort hold mode
* Fix old code
* Update homeassistant/components/climate/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/components/climate/const.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* First renaming
* Rename operation to hvac for paulus
* Rename hold mode to preset mode
* Cleanup & update comments
* Remove on/off
* Fix supported feature count
* Update services
* Update demo
* Fix tests & use current_hvac
* Update comment
* Fix tests & add typing
* Add more typing
* Update modes
* Fix tests
* Cleanup low/high with range
* Update homematic part 1
* Finish homematic
* Fix lint
* fix hm mapping
* Support simple devices
* convert lcn
* migrate oem
* Fix xs1
* update hive
* update mil
* Update toon
* migrate deconz
* cleanup
* update tesla
* Fix lint
* Fix vera
* Migrate zwave
* Migrate velbus
* Cleanup humity feature
* Cleanup
* Migrate wink
* migrate dyson
* Fix current hvac
* Renaming
* Fix lint
* Migrate tfiac
* migrate tado
* Fix PRESET can be None
* apply PR#23913 from dev
* remove EU component, etc.
* remove EU component, etc.
* ready to test now
* de-linted
* some tweaks
* de-lint
* better handling of edge cases
* delint
* fix set_mode typos
* apply PR#23913 from dev
* remove EU component, etc.
* ready to test now
* de-linted
* some tweaks
* de-lint
* better handling of edge cases
* delint
* fix set_mode typos
* delint, move debug code
* away preset now working
* code tidy-up
* code tidy-up 2
* code tidy-up 3
* address issues #18932, #15063
* address issues #18932, #15063 - 2/2
* refactor MODE_AUTO to MODE_HEAT_COOL and use F not C
* add low/high to set_temp
* add low/high to set_temp 2
* add low/high to set_temp - delint
* run HA scripts
* port changes from PR #24402
* manual rebase
* manual rebase 2
* delint
* minor change
* remove SUPPORT_HVAC_ACTION
* Migrate radiotherm
* Convert touchline
* Migrate flexit
* Migrate nuheat
* Migrate maxcube
* Fix names maxcube const
* Migrate proliphix
* Migrate heatmiser
* Migrate fritzbox
* Migrate opentherm_gw
* Migrate venstar
* Migrate daikin
* Migrate modbus
* Fix elif
* Migrate Homematic IP Cloud to climate-1.0 (#24913)
* hmip climate fix
* Update hvac_mode and preset_mode
* fix lint
* Fix lint
* Migrate generic_thermostat
* Migrate incomfort to new climate schema (#24915)
* initial commit
* Update climate.py
* Migrate eq3btsmart
* Lint
* cleanup PRESET_MANUAL
* Migrate ecobee
* No conditional features
* KNX: Migrate climate component to new climate platform (#24931)
* Migrate climate component
* Remove unused code
* Corrected line length
* Lint
* Lint
* fix tests
* Fix value
* Migrate geniushub to new climate schema (#24191)
* Update one
* Fix model climate v2
* Cleanup p4
* Add comfort hold mode
* Fix old code
* Update homeassistant/components/climate/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/components/climate/const.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* First renaming
* Rename operation to hvac for paulus
* Rename hold mode to preset mode
* Cleanup & update comments
* Remove on/off
* Fix supported feature count
* Update services
* Update demo
* Fix tests & use current_hvac
* Update comment
* Fix tests & add typing
* Add more typing
* Update modes
* Fix tests
* Cleanup low/high with range
* Update homematic part 1
* Finish homematic
* Fix lint
* fix hm mapping
* Support simple devices
* convert lcn
* migrate oem
* Fix xs1
* update hive
* update mil
* Update toon
* migrate deconz
* cleanup
* update tesla
* Fix lint
* Fix vera
* Migrate zwave
* Migrate velbus
* Cleanup humity feature
* Cleanup
* Migrate wink
* migrate dyson
* Fix current hvac
* Renaming
* Fix lint
* Migrate tfiac
* migrate tado
* delinted
* delinted
* use latest client
* clean up mappings
* clean up mappings
* add duration to set_temperature
* add duration to set_temperature
* manual rebase
* tweak
* fix regression
* small fix
* fix rebase mixup
* address comments
* finish refactor
* fix regression
* tweak type hints
* delint
* manual rebase
* WIP: Fixes for honeywell migration to climate-1.0 (#24938)
* add type hints
* code tidy-up
* Fixes for incomfort migration to climate-1.0 (#24936)
* delint type hints
* no async unless await
* revert: no async unless await
* revert: no async unless await 2
* delint
* fix typo
* Fix homekit_controller on climate-1.0 (#24948)
* Fix tests on climate-1.0 branch
* As part of climate-1.0, make state return the heating-cooling.current characteristic
* Fixes from review
* lint
* Fix imports
* Migrate stibel_eltron
* Fix lint
* Migrate coolmaster to climate 1.0 (#24967)
* Migrate coolmaster to climate 1.0
* fix lint errors
* More lint fixes
* Fix demo to work with UI
* Migrate spider
* Demo update
* Updated frontend to 20190705.0
* Fix boost mode (#24980)
* Prepare Netatmo for climate 1.0 (#24973)
* Migration Netatmo
* Address comments
* Update climate.py
* Migrate ephember
* Migrate Sensibo
* Implemented review comments (#24942)
* Migrate ESPHome
* Migrate MQTT
* Migrate Nest
* Migrate melissa
* Initial/partial migration of ST
* Migrate ST
* Remove Away mode (#24995)
* Migrate evohome, cache access tokens (#24491)
* add water_heater, add storage - initial commit
* add water_heater, add storage - initial commit
delint
add missing code
desiderata
update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
delint
* Add Broker, Water Heater & Refactor
add missing code
desiderata
* update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
* bugfix - loc_idx may not be 0
more refactor - ensure pure async
more refactoring
appears all r/o attributes are working
tweak precsion, DHW & delint
remove unused code
remove unused code 2
remove unused code, refactor _save_auth_tokens()
* support RoundThermostat
bugfix opmode, switch to util.dt, add until=1h
revert breaking change
* store at_expires as naive UTC
remove debug code
delint
tidy up exception handling
delint
add water_heater, add storage - initial commit
delint
add missing code
desiderata
update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
add water_heater, add storage - initial commit
delint
add missing code
desiderata
update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
delint
bugfix - loc_idx may not be 0
more refactor - ensure pure async
more refactoring
appears all r/o attributes are working
tweak precsion, DHW & delint
remove unused code
remove unused code 2
remove unused code, refactor _save_auth_tokens()
support RoundThermostat
bugfix opmode, switch to util.dt, add until=1h
revert breaking change
store at_expires as naive UTC
remove debug code
delint
tidy up exception handling
delint
* update CODEOWNERS
* fix regression
* fix requirements
* migrate to climate-1.0
* tweaking
* de-lint
* TCS working? & delint
* tweaking
* TCS code finalised
* remove available() logic
* refactor _switchpoints()
* tidy up switchpoint code
* tweak
* teaking device_state_attributes
* some refactoring
* move PRESET_CUSTOM back to evohome
* move CONF_ACCESS_TOKEN_EXPIRES CONF_REFRESH_TOKEN back to evohome
* refactor SP code and dt conversion
* delinted
* delinted
* remove water_heater
* fix regression
* Migrate homekit
* Cleanup away mode
* Fix tests
* add helpers
* fix tests melissa
* Fix nehueat
* fix zwave
* add more tests
* fix deconz
* Fix climate test emulate_hue
* fix tests
* fix dyson tests
* fix demo with new layout
* fix honeywell
* Switch homekit_controller to use HVAC_MODE_HEAT_COOL instead of HVAC_MODE_AUTO (#25009)
* Lint
* PyLint
* Pylint
* fix fritzbox tests
* Fix google
* Fix all tests
* Fix lint
* Fix auto for homekit like controler
* Fix lint
* fix lint
2019-07-08 12:00:24 +00:00
|
|
|
|
|
|
|
@property
|
|
|
|
def hvac_modes(self):
|
|
|
|
"""Return the list of available hvac operation modes.
|
|
|
|
|
|
|
|
Need to be a subset of HVAC_MODES.
|
|
|
|
"""
|
2020-03-30 14:06:26 +00:00
|
|
|
return self._supported_hvac_modes
|
2017-03-22 12:18:13 +00:00
|
|
|
|
|
|
|
@property
|
Climate 1.0 (#23899)
* Climate 1.0 / part 1/2/3
* fix flake
* Lint
* Update Google Assistant
* ambiclimate to climate 1.0 (#24911)
* Fix Alexa
* Lint
* Migrate zhong_hong
* Migrate tuya
* Migrate honeywell to new climate schema (#24257)
* Update one
* Fix model climate v2
* Cleanup p4
* Add comfort hold mode
* Fix old code
* Update homeassistant/components/climate/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/components/climate/const.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* First renaming
* Rename operation to hvac for paulus
* Rename hold mode to preset mode
* Cleanup & update comments
* Remove on/off
* Fix supported feature count
* Update services
* Update demo
* Fix tests & use current_hvac
* Update comment
* Fix tests & add typing
* Add more typing
* Update modes
* Fix tests
* Cleanup low/high with range
* Update homematic part 1
* Finish homematic
* Fix lint
* fix hm mapping
* Support simple devices
* convert lcn
* migrate oem
* Fix xs1
* update hive
* update mil
* Update toon
* migrate deconz
* cleanup
* update tesla
* Fix lint
* Fix vera
* Migrate zwave
* Migrate velbus
* Cleanup humity feature
* Cleanup
* Migrate wink
* migrate dyson
* Fix current hvac
* Renaming
* Fix lint
* Migrate tfiac
* migrate tado
* Fix PRESET can be None
* apply PR#23913 from dev
* remove EU component, etc.
* remove EU component, etc.
* ready to test now
* de-linted
* some tweaks
* de-lint
* better handling of edge cases
* delint
* fix set_mode typos
* apply PR#23913 from dev
* remove EU component, etc.
* ready to test now
* de-linted
* some tweaks
* de-lint
* better handling of edge cases
* delint
* fix set_mode typos
* delint, move debug code
* away preset now working
* code tidy-up
* code tidy-up 2
* code tidy-up 3
* address issues #18932, #15063
* address issues #18932, #15063 - 2/2
* refactor MODE_AUTO to MODE_HEAT_COOL and use F not C
* add low/high to set_temp
* add low/high to set_temp 2
* add low/high to set_temp - delint
* run HA scripts
* port changes from PR #24402
* manual rebase
* manual rebase 2
* delint
* minor change
* remove SUPPORT_HVAC_ACTION
* Migrate radiotherm
* Convert touchline
* Migrate flexit
* Migrate nuheat
* Migrate maxcube
* Fix names maxcube const
* Migrate proliphix
* Migrate heatmiser
* Migrate fritzbox
* Migrate opentherm_gw
* Migrate venstar
* Migrate daikin
* Migrate modbus
* Fix elif
* Migrate Homematic IP Cloud to climate-1.0 (#24913)
* hmip climate fix
* Update hvac_mode and preset_mode
* fix lint
* Fix lint
* Migrate generic_thermostat
* Migrate incomfort to new climate schema (#24915)
* initial commit
* Update climate.py
* Migrate eq3btsmart
* Lint
* cleanup PRESET_MANUAL
* Migrate ecobee
* No conditional features
* KNX: Migrate climate component to new climate platform (#24931)
* Migrate climate component
* Remove unused code
* Corrected line length
* Lint
* Lint
* fix tests
* Fix value
* Migrate geniushub to new climate schema (#24191)
* Update one
* Fix model climate v2
* Cleanup p4
* Add comfort hold mode
* Fix old code
* Update homeassistant/components/climate/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/components/climate/const.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* First renaming
* Rename operation to hvac for paulus
* Rename hold mode to preset mode
* Cleanup & update comments
* Remove on/off
* Fix supported feature count
* Update services
* Update demo
* Fix tests & use current_hvac
* Update comment
* Fix tests & add typing
* Add more typing
* Update modes
* Fix tests
* Cleanup low/high with range
* Update homematic part 1
* Finish homematic
* Fix lint
* fix hm mapping
* Support simple devices
* convert lcn
* migrate oem
* Fix xs1
* update hive
* update mil
* Update toon
* migrate deconz
* cleanup
* update tesla
* Fix lint
* Fix vera
* Migrate zwave
* Migrate velbus
* Cleanup humity feature
* Cleanup
* Migrate wink
* migrate dyson
* Fix current hvac
* Renaming
* Fix lint
* Migrate tfiac
* migrate tado
* delinted
* delinted
* use latest client
* clean up mappings
* clean up mappings
* add duration to set_temperature
* add duration to set_temperature
* manual rebase
* tweak
* fix regression
* small fix
* fix rebase mixup
* address comments
* finish refactor
* fix regression
* tweak type hints
* delint
* manual rebase
* WIP: Fixes for honeywell migration to climate-1.0 (#24938)
* add type hints
* code tidy-up
* Fixes for incomfort migration to climate-1.0 (#24936)
* delint type hints
* no async unless await
* revert: no async unless await
* revert: no async unless await 2
* delint
* fix typo
* Fix homekit_controller on climate-1.0 (#24948)
* Fix tests on climate-1.0 branch
* As part of climate-1.0, make state return the heating-cooling.current characteristic
* Fixes from review
* lint
* Fix imports
* Migrate stibel_eltron
* Fix lint
* Migrate coolmaster to climate 1.0 (#24967)
* Migrate coolmaster to climate 1.0
* fix lint errors
* More lint fixes
* Fix demo to work with UI
* Migrate spider
* Demo update
* Updated frontend to 20190705.0
* Fix boost mode (#24980)
* Prepare Netatmo for climate 1.0 (#24973)
* Migration Netatmo
* Address comments
* Update climate.py
* Migrate ephember
* Migrate Sensibo
* Implemented review comments (#24942)
* Migrate ESPHome
* Migrate MQTT
* Migrate Nest
* Migrate melissa
* Initial/partial migration of ST
* Migrate ST
* Remove Away mode (#24995)
* Migrate evohome, cache access tokens (#24491)
* add water_heater, add storage - initial commit
* add water_heater, add storage - initial commit
delint
add missing code
desiderata
update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
delint
* Add Broker, Water Heater & Refactor
add missing code
desiderata
* update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
* bugfix - loc_idx may not be 0
more refactor - ensure pure async
more refactoring
appears all r/o attributes are working
tweak precsion, DHW & delint
remove unused code
remove unused code 2
remove unused code, refactor _save_auth_tokens()
* support RoundThermostat
bugfix opmode, switch to util.dt, add until=1h
revert breaking change
* store at_expires as naive UTC
remove debug code
delint
tidy up exception handling
delint
add water_heater, add storage - initial commit
delint
add missing code
desiderata
update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
add water_heater, add storage - initial commit
delint
add missing code
desiderata
update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
delint
bugfix - loc_idx may not be 0
more refactor - ensure pure async
more refactoring
appears all r/o attributes are working
tweak precsion, DHW & delint
remove unused code
remove unused code 2
remove unused code, refactor _save_auth_tokens()
support RoundThermostat
bugfix opmode, switch to util.dt, add until=1h
revert breaking change
store at_expires as naive UTC
remove debug code
delint
tidy up exception handling
delint
* update CODEOWNERS
* fix regression
* fix requirements
* migrate to climate-1.0
* tweaking
* de-lint
* TCS working? & delint
* tweaking
* TCS code finalised
* remove available() logic
* refactor _switchpoints()
* tidy up switchpoint code
* tweak
* teaking device_state_attributes
* some refactoring
* move PRESET_CUSTOM back to evohome
* move CONF_ACCESS_TOKEN_EXPIRES CONF_REFRESH_TOKEN back to evohome
* refactor SP code and dt conversion
* delinted
* delinted
* remove water_heater
* fix regression
* Migrate homekit
* Cleanup away mode
* Fix tests
* add helpers
* fix tests melissa
* Fix nehueat
* fix zwave
* add more tests
* fix deconz
* Fix climate test emulate_hue
* fix tests
* fix dyson tests
* fix demo with new layout
* fix honeywell
* Switch homekit_controller to use HVAC_MODE_HEAT_COOL instead of HVAC_MODE_AUTO (#25009)
* Lint
* PyLint
* Pylint
* fix fritzbox tests
* Fix google
* Fix all tests
* Fix lint
* Fix auto for homekit like controler
* Fix lint
* fix lint
2019-07-08 12:00:24 +00:00
|
|
|
def hvac_action(self):
|
|
|
|
"""Return the current running hvac operation if supported.
|
|
|
|
|
|
|
|
Need to be one of CURRENT_HVAC_*.
|
|
|
|
"""
|
2020-03-30 14:06:26 +00:00
|
|
|
return TADO_HVAC_ACTION_TO_HA_HVAC_ACTION.get(
|
|
|
|
self._tado_zone_data.current_hvac_action, CURRENT_HVAC_OFF
|
|
|
|
)
|
2017-03-22 12:18:13 +00:00
|
|
|
|
2017-06-23 16:45:44 +00:00
|
|
|
@property
|
Climate 1.0 (#23899)
* Climate 1.0 / part 1/2/3
* fix flake
* Lint
* Update Google Assistant
* ambiclimate to climate 1.0 (#24911)
* Fix Alexa
* Lint
* Migrate zhong_hong
* Migrate tuya
* Migrate honeywell to new climate schema (#24257)
* Update one
* Fix model climate v2
* Cleanup p4
* Add comfort hold mode
* Fix old code
* Update homeassistant/components/climate/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/components/climate/const.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* First renaming
* Rename operation to hvac for paulus
* Rename hold mode to preset mode
* Cleanup & update comments
* Remove on/off
* Fix supported feature count
* Update services
* Update demo
* Fix tests & use current_hvac
* Update comment
* Fix tests & add typing
* Add more typing
* Update modes
* Fix tests
* Cleanup low/high with range
* Update homematic part 1
* Finish homematic
* Fix lint
* fix hm mapping
* Support simple devices
* convert lcn
* migrate oem
* Fix xs1
* update hive
* update mil
* Update toon
* migrate deconz
* cleanup
* update tesla
* Fix lint
* Fix vera
* Migrate zwave
* Migrate velbus
* Cleanup humity feature
* Cleanup
* Migrate wink
* migrate dyson
* Fix current hvac
* Renaming
* Fix lint
* Migrate tfiac
* migrate tado
* Fix PRESET can be None
* apply PR#23913 from dev
* remove EU component, etc.
* remove EU component, etc.
* ready to test now
* de-linted
* some tweaks
* de-lint
* better handling of edge cases
* delint
* fix set_mode typos
* apply PR#23913 from dev
* remove EU component, etc.
* ready to test now
* de-linted
* some tweaks
* de-lint
* better handling of edge cases
* delint
* fix set_mode typos
* delint, move debug code
* away preset now working
* code tidy-up
* code tidy-up 2
* code tidy-up 3
* address issues #18932, #15063
* address issues #18932, #15063 - 2/2
* refactor MODE_AUTO to MODE_HEAT_COOL and use F not C
* add low/high to set_temp
* add low/high to set_temp 2
* add low/high to set_temp - delint
* run HA scripts
* port changes from PR #24402
* manual rebase
* manual rebase 2
* delint
* minor change
* remove SUPPORT_HVAC_ACTION
* Migrate radiotherm
* Convert touchline
* Migrate flexit
* Migrate nuheat
* Migrate maxcube
* Fix names maxcube const
* Migrate proliphix
* Migrate heatmiser
* Migrate fritzbox
* Migrate opentherm_gw
* Migrate venstar
* Migrate daikin
* Migrate modbus
* Fix elif
* Migrate Homematic IP Cloud to climate-1.0 (#24913)
* hmip climate fix
* Update hvac_mode and preset_mode
* fix lint
* Fix lint
* Migrate generic_thermostat
* Migrate incomfort to new climate schema (#24915)
* initial commit
* Update climate.py
* Migrate eq3btsmart
* Lint
* cleanup PRESET_MANUAL
* Migrate ecobee
* No conditional features
* KNX: Migrate climate component to new climate platform (#24931)
* Migrate climate component
* Remove unused code
* Corrected line length
* Lint
* Lint
* fix tests
* Fix value
* Migrate geniushub to new climate schema (#24191)
* Update one
* Fix model climate v2
* Cleanup p4
* Add comfort hold mode
* Fix old code
* Update homeassistant/components/climate/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/components/climate/const.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* First renaming
* Rename operation to hvac for paulus
* Rename hold mode to preset mode
* Cleanup & update comments
* Remove on/off
* Fix supported feature count
* Update services
* Update demo
* Fix tests & use current_hvac
* Update comment
* Fix tests & add typing
* Add more typing
* Update modes
* Fix tests
* Cleanup low/high with range
* Update homematic part 1
* Finish homematic
* Fix lint
* fix hm mapping
* Support simple devices
* convert lcn
* migrate oem
* Fix xs1
* update hive
* update mil
* Update toon
* migrate deconz
* cleanup
* update tesla
* Fix lint
* Fix vera
* Migrate zwave
* Migrate velbus
* Cleanup humity feature
* Cleanup
* Migrate wink
* migrate dyson
* Fix current hvac
* Renaming
* Fix lint
* Migrate tfiac
* migrate tado
* delinted
* delinted
* use latest client
* clean up mappings
* clean up mappings
* add duration to set_temperature
* add duration to set_temperature
* manual rebase
* tweak
* fix regression
* small fix
* fix rebase mixup
* address comments
* finish refactor
* fix regression
* tweak type hints
* delint
* manual rebase
* WIP: Fixes for honeywell migration to climate-1.0 (#24938)
* add type hints
* code tidy-up
* Fixes for incomfort migration to climate-1.0 (#24936)
* delint type hints
* no async unless await
* revert: no async unless await
* revert: no async unless await 2
* delint
* fix typo
* Fix homekit_controller on climate-1.0 (#24948)
* Fix tests on climate-1.0 branch
* As part of climate-1.0, make state return the heating-cooling.current characteristic
* Fixes from review
* lint
* Fix imports
* Migrate stibel_eltron
* Fix lint
* Migrate coolmaster to climate 1.0 (#24967)
* Migrate coolmaster to climate 1.0
* fix lint errors
* More lint fixes
* Fix demo to work with UI
* Migrate spider
* Demo update
* Updated frontend to 20190705.0
* Fix boost mode (#24980)
* Prepare Netatmo for climate 1.0 (#24973)
* Migration Netatmo
* Address comments
* Update climate.py
* Migrate ephember
* Migrate Sensibo
* Implemented review comments (#24942)
* Migrate ESPHome
* Migrate MQTT
* Migrate Nest
* Migrate melissa
* Initial/partial migration of ST
* Migrate ST
* Remove Away mode (#24995)
* Migrate evohome, cache access tokens (#24491)
* add water_heater, add storage - initial commit
* add water_heater, add storage - initial commit
delint
add missing code
desiderata
update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
delint
* Add Broker, Water Heater & Refactor
add missing code
desiderata
* update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
* bugfix - loc_idx may not be 0
more refactor - ensure pure async
more refactoring
appears all r/o attributes are working
tweak precsion, DHW & delint
remove unused code
remove unused code 2
remove unused code, refactor _save_auth_tokens()
* support RoundThermostat
bugfix opmode, switch to util.dt, add until=1h
revert breaking change
* store at_expires as naive UTC
remove debug code
delint
tidy up exception handling
delint
add water_heater, add storage - initial commit
delint
add missing code
desiderata
update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
add water_heater, add storage - initial commit
delint
add missing code
desiderata
update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
delint
bugfix - loc_idx may not be 0
more refactor - ensure pure async
more refactoring
appears all r/o attributes are working
tweak precsion, DHW & delint
remove unused code
remove unused code 2
remove unused code, refactor _save_auth_tokens()
support RoundThermostat
bugfix opmode, switch to util.dt, add until=1h
revert breaking change
store at_expires as naive UTC
remove debug code
delint
tidy up exception handling
delint
* update CODEOWNERS
* fix regression
* fix requirements
* migrate to climate-1.0
* tweaking
* de-lint
* TCS working? & delint
* tweaking
* TCS code finalised
* remove available() logic
* refactor _switchpoints()
* tidy up switchpoint code
* tweak
* teaking device_state_attributes
* some refactoring
* move PRESET_CUSTOM back to evohome
* move CONF_ACCESS_TOKEN_EXPIRES CONF_REFRESH_TOKEN back to evohome
* refactor SP code and dt conversion
* delinted
* delinted
* remove water_heater
* fix regression
* Migrate homekit
* Cleanup away mode
* Fix tests
* add helpers
* fix tests melissa
* Fix nehueat
* fix zwave
* add more tests
* fix deconz
* Fix climate test emulate_hue
* fix tests
* fix dyson tests
* fix demo with new layout
* fix honeywell
* Switch homekit_controller to use HVAC_MODE_HEAT_COOL instead of HVAC_MODE_AUTO (#25009)
* Lint
* PyLint
* Pylint
* fix fritzbox tests
* Fix google
* Fix all tests
* Fix lint
* Fix auto for homekit like controler
* Fix lint
* fix lint
2019-07-08 12:00:24 +00:00
|
|
|
def fan_mode(self):
|
2017-06-23 16:45:44 +00:00
|
|
|
"""Return the fan setting."""
|
2019-08-12 04:02:16 +00:00
|
|
|
if self._ac_device:
|
2020-03-30 14:06:26 +00:00
|
|
|
return TADO_TO_HA_FAN_MODE_MAP.get(self._current_tado_fan_speed, FAN_AUTO)
|
2017-07-06 06:30:01 +00:00
|
|
|
return None
|
2017-06-23 16:45:44 +00:00
|
|
|
|
|
|
|
@property
|
Climate 1.0 (#23899)
* Climate 1.0 / part 1/2/3
* fix flake
* Lint
* Update Google Assistant
* ambiclimate to climate 1.0 (#24911)
* Fix Alexa
* Lint
* Migrate zhong_hong
* Migrate tuya
* Migrate honeywell to new climate schema (#24257)
* Update one
* Fix model climate v2
* Cleanup p4
* Add comfort hold mode
* Fix old code
* Update homeassistant/components/climate/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/components/climate/const.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* First renaming
* Rename operation to hvac for paulus
* Rename hold mode to preset mode
* Cleanup & update comments
* Remove on/off
* Fix supported feature count
* Update services
* Update demo
* Fix tests & use current_hvac
* Update comment
* Fix tests & add typing
* Add more typing
* Update modes
* Fix tests
* Cleanup low/high with range
* Update homematic part 1
* Finish homematic
* Fix lint
* fix hm mapping
* Support simple devices
* convert lcn
* migrate oem
* Fix xs1
* update hive
* update mil
* Update toon
* migrate deconz
* cleanup
* update tesla
* Fix lint
* Fix vera
* Migrate zwave
* Migrate velbus
* Cleanup humity feature
* Cleanup
* Migrate wink
* migrate dyson
* Fix current hvac
* Renaming
* Fix lint
* Migrate tfiac
* migrate tado
* Fix PRESET can be None
* apply PR#23913 from dev
* remove EU component, etc.
* remove EU component, etc.
* ready to test now
* de-linted
* some tweaks
* de-lint
* better handling of edge cases
* delint
* fix set_mode typos
* apply PR#23913 from dev
* remove EU component, etc.
* ready to test now
* de-linted
* some tweaks
* de-lint
* better handling of edge cases
* delint
* fix set_mode typos
* delint, move debug code
* away preset now working
* code tidy-up
* code tidy-up 2
* code tidy-up 3
* address issues #18932, #15063
* address issues #18932, #15063 - 2/2
* refactor MODE_AUTO to MODE_HEAT_COOL and use F not C
* add low/high to set_temp
* add low/high to set_temp 2
* add low/high to set_temp - delint
* run HA scripts
* port changes from PR #24402
* manual rebase
* manual rebase 2
* delint
* minor change
* remove SUPPORT_HVAC_ACTION
* Migrate radiotherm
* Convert touchline
* Migrate flexit
* Migrate nuheat
* Migrate maxcube
* Fix names maxcube const
* Migrate proliphix
* Migrate heatmiser
* Migrate fritzbox
* Migrate opentherm_gw
* Migrate venstar
* Migrate daikin
* Migrate modbus
* Fix elif
* Migrate Homematic IP Cloud to climate-1.0 (#24913)
* hmip climate fix
* Update hvac_mode and preset_mode
* fix lint
* Fix lint
* Migrate generic_thermostat
* Migrate incomfort to new climate schema (#24915)
* initial commit
* Update climate.py
* Migrate eq3btsmart
* Lint
* cleanup PRESET_MANUAL
* Migrate ecobee
* No conditional features
* KNX: Migrate climate component to new climate platform (#24931)
* Migrate climate component
* Remove unused code
* Corrected line length
* Lint
* Lint
* fix tests
* Fix value
* Migrate geniushub to new climate schema (#24191)
* Update one
* Fix model climate v2
* Cleanup p4
* Add comfort hold mode
* Fix old code
* Update homeassistant/components/climate/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/components/climate/const.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* First renaming
* Rename operation to hvac for paulus
* Rename hold mode to preset mode
* Cleanup & update comments
* Remove on/off
* Fix supported feature count
* Update services
* Update demo
* Fix tests & use current_hvac
* Update comment
* Fix tests & add typing
* Add more typing
* Update modes
* Fix tests
* Cleanup low/high with range
* Update homematic part 1
* Finish homematic
* Fix lint
* fix hm mapping
* Support simple devices
* convert lcn
* migrate oem
* Fix xs1
* update hive
* update mil
* Update toon
* migrate deconz
* cleanup
* update tesla
* Fix lint
* Fix vera
* Migrate zwave
* Migrate velbus
* Cleanup humity feature
* Cleanup
* Migrate wink
* migrate dyson
* Fix current hvac
* Renaming
* Fix lint
* Migrate tfiac
* migrate tado
* delinted
* delinted
* use latest client
* clean up mappings
* clean up mappings
* add duration to set_temperature
* add duration to set_temperature
* manual rebase
* tweak
* fix regression
* small fix
* fix rebase mixup
* address comments
* finish refactor
* fix regression
* tweak type hints
* delint
* manual rebase
* WIP: Fixes for honeywell migration to climate-1.0 (#24938)
* add type hints
* code tidy-up
* Fixes for incomfort migration to climate-1.0 (#24936)
* delint type hints
* no async unless await
* revert: no async unless await
* revert: no async unless await 2
* delint
* fix typo
* Fix homekit_controller on climate-1.0 (#24948)
* Fix tests on climate-1.0 branch
* As part of climate-1.0, make state return the heating-cooling.current characteristic
* Fixes from review
* lint
* Fix imports
* Migrate stibel_eltron
* Fix lint
* Migrate coolmaster to climate 1.0 (#24967)
* Migrate coolmaster to climate 1.0
* fix lint errors
* More lint fixes
* Fix demo to work with UI
* Migrate spider
* Demo update
* Updated frontend to 20190705.0
* Fix boost mode (#24980)
* Prepare Netatmo for climate 1.0 (#24973)
* Migration Netatmo
* Address comments
* Update climate.py
* Migrate ephember
* Migrate Sensibo
* Implemented review comments (#24942)
* Migrate ESPHome
* Migrate MQTT
* Migrate Nest
* Migrate melissa
* Initial/partial migration of ST
* Migrate ST
* Remove Away mode (#24995)
* Migrate evohome, cache access tokens (#24491)
* add water_heater, add storage - initial commit
* add water_heater, add storage - initial commit
delint
add missing code
desiderata
update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
delint
* Add Broker, Water Heater & Refactor
add missing code
desiderata
* update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
* bugfix - loc_idx may not be 0
more refactor - ensure pure async
more refactoring
appears all r/o attributes are working
tweak precsion, DHW & delint
remove unused code
remove unused code 2
remove unused code, refactor _save_auth_tokens()
* support RoundThermostat
bugfix opmode, switch to util.dt, add until=1h
revert breaking change
* store at_expires as naive UTC
remove debug code
delint
tidy up exception handling
delint
add water_heater, add storage - initial commit
delint
add missing code
desiderata
update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
add water_heater, add storage - initial commit
delint
add missing code
desiderata
update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
delint
bugfix - loc_idx may not be 0
more refactor - ensure pure async
more refactoring
appears all r/o attributes are working
tweak precsion, DHW & delint
remove unused code
remove unused code 2
remove unused code, refactor _save_auth_tokens()
support RoundThermostat
bugfix opmode, switch to util.dt, add until=1h
revert breaking change
store at_expires as naive UTC
remove debug code
delint
tidy up exception handling
delint
* update CODEOWNERS
* fix regression
* fix requirements
* migrate to climate-1.0
* tweaking
* de-lint
* TCS working? & delint
* tweaking
* TCS code finalised
* remove available() logic
* refactor _switchpoints()
* tidy up switchpoint code
* tweak
* teaking device_state_attributes
* some refactoring
* move PRESET_CUSTOM back to evohome
* move CONF_ACCESS_TOKEN_EXPIRES CONF_REFRESH_TOKEN back to evohome
* refactor SP code and dt conversion
* delinted
* delinted
* remove water_heater
* fix regression
* Migrate homekit
* Cleanup away mode
* Fix tests
* add helpers
* fix tests melissa
* Fix nehueat
* fix zwave
* add more tests
* fix deconz
* Fix climate test emulate_hue
* fix tests
* fix dyson tests
* fix demo with new layout
* fix honeywell
* Switch homekit_controller to use HVAC_MODE_HEAT_COOL instead of HVAC_MODE_AUTO (#25009)
* Lint
* PyLint
* Pylint
* fix fritzbox tests
* Fix google
* Fix all tests
* Fix lint
* Fix auto for homekit like controler
* Fix lint
* fix lint
2019-07-08 12:00:24 +00:00
|
|
|
def fan_modes(self):
|
2017-06-23 16:45:44 +00:00
|
|
|
"""List of available fan modes."""
|
2020-03-30 14:06:26 +00:00
|
|
|
return self._supported_fan_modes
|
Climate 1.0 (#23899)
* Climate 1.0 / part 1/2/3
* fix flake
* Lint
* Update Google Assistant
* ambiclimate to climate 1.0 (#24911)
* Fix Alexa
* Lint
* Migrate zhong_hong
* Migrate tuya
* Migrate honeywell to new climate schema (#24257)
* Update one
* Fix model climate v2
* Cleanup p4
* Add comfort hold mode
* Fix old code
* Update homeassistant/components/climate/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/components/climate/const.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* First renaming
* Rename operation to hvac for paulus
* Rename hold mode to preset mode
* Cleanup & update comments
* Remove on/off
* Fix supported feature count
* Update services
* Update demo
* Fix tests & use current_hvac
* Update comment
* Fix tests & add typing
* Add more typing
* Update modes
* Fix tests
* Cleanup low/high with range
* Update homematic part 1
* Finish homematic
* Fix lint
* fix hm mapping
* Support simple devices
* convert lcn
* migrate oem
* Fix xs1
* update hive
* update mil
* Update toon
* migrate deconz
* cleanup
* update tesla
* Fix lint
* Fix vera
* Migrate zwave
* Migrate velbus
* Cleanup humity feature
* Cleanup
* Migrate wink
* migrate dyson
* Fix current hvac
* Renaming
* Fix lint
* Migrate tfiac
* migrate tado
* Fix PRESET can be None
* apply PR#23913 from dev
* remove EU component, etc.
* remove EU component, etc.
* ready to test now
* de-linted
* some tweaks
* de-lint
* better handling of edge cases
* delint
* fix set_mode typos
* apply PR#23913 from dev
* remove EU component, etc.
* ready to test now
* de-linted
* some tweaks
* de-lint
* better handling of edge cases
* delint
* fix set_mode typos
* delint, move debug code
* away preset now working
* code tidy-up
* code tidy-up 2
* code tidy-up 3
* address issues #18932, #15063
* address issues #18932, #15063 - 2/2
* refactor MODE_AUTO to MODE_HEAT_COOL and use F not C
* add low/high to set_temp
* add low/high to set_temp 2
* add low/high to set_temp - delint
* run HA scripts
* port changes from PR #24402
* manual rebase
* manual rebase 2
* delint
* minor change
* remove SUPPORT_HVAC_ACTION
* Migrate radiotherm
* Convert touchline
* Migrate flexit
* Migrate nuheat
* Migrate maxcube
* Fix names maxcube const
* Migrate proliphix
* Migrate heatmiser
* Migrate fritzbox
* Migrate opentherm_gw
* Migrate venstar
* Migrate daikin
* Migrate modbus
* Fix elif
* Migrate Homematic IP Cloud to climate-1.0 (#24913)
* hmip climate fix
* Update hvac_mode and preset_mode
* fix lint
* Fix lint
* Migrate generic_thermostat
* Migrate incomfort to new climate schema (#24915)
* initial commit
* Update climate.py
* Migrate eq3btsmart
* Lint
* cleanup PRESET_MANUAL
* Migrate ecobee
* No conditional features
* KNX: Migrate climate component to new climate platform (#24931)
* Migrate climate component
* Remove unused code
* Corrected line length
* Lint
* Lint
* fix tests
* Fix value
* Migrate geniushub to new climate schema (#24191)
* Update one
* Fix model climate v2
* Cleanup p4
* Add comfort hold mode
* Fix old code
* Update homeassistant/components/climate/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/components/climate/const.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* First renaming
* Rename operation to hvac for paulus
* Rename hold mode to preset mode
* Cleanup & update comments
* Remove on/off
* Fix supported feature count
* Update services
* Update demo
* Fix tests & use current_hvac
* Update comment
* Fix tests & add typing
* Add more typing
* Update modes
* Fix tests
* Cleanup low/high with range
* Update homematic part 1
* Finish homematic
* Fix lint
* fix hm mapping
* Support simple devices
* convert lcn
* migrate oem
* Fix xs1
* update hive
* update mil
* Update toon
* migrate deconz
* cleanup
* update tesla
* Fix lint
* Fix vera
* Migrate zwave
* Migrate velbus
* Cleanup humity feature
* Cleanup
* Migrate wink
* migrate dyson
* Fix current hvac
* Renaming
* Fix lint
* Migrate tfiac
* migrate tado
* delinted
* delinted
* use latest client
* clean up mappings
* clean up mappings
* add duration to set_temperature
* add duration to set_temperature
* manual rebase
* tweak
* fix regression
* small fix
* fix rebase mixup
* address comments
* finish refactor
* fix regression
* tweak type hints
* delint
* manual rebase
* WIP: Fixes for honeywell migration to climate-1.0 (#24938)
* add type hints
* code tidy-up
* Fixes for incomfort migration to climate-1.0 (#24936)
* delint type hints
* no async unless await
* revert: no async unless await
* revert: no async unless await 2
* delint
* fix typo
* Fix homekit_controller on climate-1.0 (#24948)
* Fix tests on climate-1.0 branch
* As part of climate-1.0, make state return the heating-cooling.current characteristic
* Fixes from review
* lint
* Fix imports
* Migrate stibel_eltron
* Fix lint
* Migrate coolmaster to climate 1.0 (#24967)
* Migrate coolmaster to climate 1.0
* fix lint errors
* More lint fixes
* Fix demo to work with UI
* Migrate spider
* Demo update
* Updated frontend to 20190705.0
* Fix boost mode (#24980)
* Prepare Netatmo for climate 1.0 (#24973)
* Migration Netatmo
* Address comments
* Update climate.py
* Migrate ephember
* Migrate Sensibo
* Implemented review comments (#24942)
* Migrate ESPHome
* Migrate MQTT
* Migrate Nest
* Migrate melissa
* Initial/partial migration of ST
* Migrate ST
* Remove Away mode (#24995)
* Migrate evohome, cache access tokens (#24491)
* add water_heater, add storage - initial commit
* add water_heater, add storage - initial commit
delint
add missing code
desiderata
update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
delint
* Add Broker, Water Heater & Refactor
add missing code
desiderata
* update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
* bugfix - loc_idx may not be 0
more refactor - ensure pure async
more refactoring
appears all r/o attributes are working
tweak precsion, DHW & delint
remove unused code
remove unused code 2
remove unused code, refactor _save_auth_tokens()
* support RoundThermostat
bugfix opmode, switch to util.dt, add until=1h
revert breaking change
* store at_expires as naive UTC
remove debug code
delint
tidy up exception handling
delint
add water_heater, add storage - initial commit
delint
add missing code
desiderata
update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
add water_heater, add storage - initial commit
delint
add missing code
desiderata
update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
delint
bugfix - loc_idx may not be 0
more refactor - ensure pure async
more refactoring
appears all r/o attributes are working
tweak precsion, DHW & delint
remove unused code
remove unused code 2
remove unused code, refactor _save_auth_tokens()
support RoundThermostat
bugfix opmode, switch to util.dt, add until=1h
revert breaking change
store at_expires as naive UTC
remove debug code
delint
tidy up exception handling
delint
* update CODEOWNERS
* fix regression
* fix requirements
* migrate to climate-1.0
* tweaking
* de-lint
* TCS working? & delint
* tweaking
* TCS code finalised
* remove available() logic
* refactor _switchpoints()
* tidy up switchpoint code
* tweak
* teaking device_state_attributes
* some refactoring
* move PRESET_CUSTOM back to evohome
* move CONF_ACCESS_TOKEN_EXPIRES CONF_REFRESH_TOKEN back to evohome
* refactor SP code and dt conversion
* delinted
* delinted
* remove water_heater
* fix regression
* Migrate homekit
* Cleanup away mode
* Fix tests
* add helpers
* fix tests melissa
* Fix nehueat
* fix zwave
* add more tests
* fix deconz
* Fix climate test emulate_hue
* fix tests
* fix dyson tests
* fix demo with new layout
* fix honeywell
* Switch homekit_controller to use HVAC_MODE_HEAT_COOL instead of HVAC_MODE_AUTO (#25009)
* Lint
* PyLint
* Pylint
* fix fritzbox tests
* Fix google
* Fix all tests
* Fix lint
* Fix auto for homekit like controler
* Fix lint
* fix lint
2019-07-08 12:00:24 +00:00
|
|
|
|
2019-08-12 04:02:16 +00:00
|
|
|
def set_fan_mode(self, fan_mode: str):
|
|
|
|
"""Turn fan on/off."""
|
2020-03-30 14:06:26 +00:00
|
|
|
self._control_hvac(fan_mode=HA_TO_TADO_FAN_MODE_MAP[fan_mode])
|
2019-08-12 04:02:16 +00:00
|
|
|
|
Climate 1.0 (#23899)
* Climate 1.0 / part 1/2/3
* fix flake
* Lint
* Update Google Assistant
* ambiclimate to climate 1.0 (#24911)
* Fix Alexa
* Lint
* Migrate zhong_hong
* Migrate tuya
* Migrate honeywell to new climate schema (#24257)
* Update one
* Fix model climate v2
* Cleanup p4
* Add comfort hold mode
* Fix old code
* Update homeassistant/components/climate/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/components/climate/const.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* First renaming
* Rename operation to hvac for paulus
* Rename hold mode to preset mode
* Cleanup & update comments
* Remove on/off
* Fix supported feature count
* Update services
* Update demo
* Fix tests & use current_hvac
* Update comment
* Fix tests & add typing
* Add more typing
* Update modes
* Fix tests
* Cleanup low/high with range
* Update homematic part 1
* Finish homematic
* Fix lint
* fix hm mapping
* Support simple devices
* convert lcn
* migrate oem
* Fix xs1
* update hive
* update mil
* Update toon
* migrate deconz
* cleanup
* update tesla
* Fix lint
* Fix vera
* Migrate zwave
* Migrate velbus
* Cleanup humity feature
* Cleanup
* Migrate wink
* migrate dyson
* Fix current hvac
* Renaming
* Fix lint
* Migrate tfiac
* migrate tado
* Fix PRESET can be None
* apply PR#23913 from dev
* remove EU component, etc.
* remove EU component, etc.
* ready to test now
* de-linted
* some tweaks
* de-lint
* better handling of edge cases
* delint
* fix set_mode typos
* apply PR#23913 from dev
* remove EU component, etc.
* ready to test now
* de-linted
* some tweaks
* de-lint
* better handling of edge cases
* delint
* fix set_mode typos
* delint, move debug code
* away preset now working
* code tidy-up
* code tidy-up 2
* code tidy-up 3
* address issues #18932, #15063
* address issues #18932, #15063 - 2/2
* refactor MODE_AUTO to MODE_HEAT_COOL and use F not C
* add low/high to set_temp
* add low/high to set_temp 2
* add low/high to set_temp - delint
* run HA scripts
* port changes from PR #24402
* manual rebase
* manual rebase 2
* delint
* minor change
* remove SUPPORT_HVAC_ACTION
* Migrate radiotherm
* Convert touchline
* Migrate flexit
* Migrate nuheat
* Migrate maxcube
* Fix names maxcube const
* Migrate proliphix
* Migrate heatmiser
* Migrate fritzbox
* Migrate opentherm_gw
* Migrate venstar
* Migrate daikin
* Migrate modbus
* Fix elif
* Migrate Homematic IP Cloud to climate-1.0 (#24913)
* hmip climate fix
* Update hvac_mode and preset_mode
* fix lint
* Fix lint
* Migrate generic_thermostat
* Migrate incomfort to new climate schema (#24915)
* initial commit
* Update climate.py
* Migrate eq3btsmart
* Lint
* cleanup PRESET_MANUAL
* Migrate ecobee
* No conditional features
* KNX: Migrate climate component to new climate platform (#24931)
* Migrate climate component
* Remove unused code
* Corrected line length
* Lint
* Lint
* fix tests
* Fix value
* Migrate geniushub to new climate schema (#24191)
* Update one
* Fix model climate v2
* Cleanup p4
* Add comfort hold mode
* Fix old code
* Update homeassistant/components/climate/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/components/climate/const.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* First renaming
* Rename operation to hvac for paulus
* Rename hold mode to preset mode
* Cleanup & update comments
* Remove on/off
* Fix supported feature count
* Update services
* Update demo
* Fix tests & use current_hvac
* Update comment
* Fix tests & add typing
* Add more typing
* Update modes
* Fix tests
* Cleanup low/high with range
* Update homematic part 1
* Finish homematic
* Fix lint
* fix hm mapping
* Support simple devices
* convert lcn
* migrate oem
* Fix xs1
* update hive
* update mil
* Update toon
* migrate deconz
* cleanup
* update tesla
* Fix lint
* Fix vera
* Migrate zwave
* Migrate velbus
* Cleanup humity feature
* Cleanup
* Migrate wink
* migrate dyson
* Fix current hvac
* Renaming
* Fix lint
* Migrate tfiac
* migrate tado
* delinted
* delinted
* use latest client
* clean up mappings
* clean up mappings
* add duration to set_temperature
* add duration to set_temperature
* manual rebase
* tweak
* fix regression
* small fix
* fix rebase mixup
* address comments
* finish refactor
* fix regression
* tweak type hints
* delint
* manual rebase
* WIP: Fixes for honeywell migration to climate-1.0 (#24938)
* add type hints
* code tidy-up
* Fixes for incomfort migration to climate-1.0 (#24936)
* delint type hints
* no async unless await
* revert: no async unless await
* revert: no async unless await 2
* delint
* fix typo
* Fix homekit_controller on climate-1.0 (#24948)
* Fix tests on climate-1.0 branch
* As part of climate-1.0, make state return the heating-cooling.current characteristic
* Fixes from review
* lint
* Fix imports
* Migrate stibel_eltron
* Fix lint
* Migrate coolmaster to climate 1.0 (#24967)
* Migrate coolmaster to climate 1.0
* fix lint errors
* More lint fixes
* Fix demo to work with UI
* Migrate spider
* Demo update
* Updated frontend to 20190705.0
* Fix boost mode (#24980)
* Prepare Netatmo for climate 1.0 (#24973)
* Migration Netatmo
* Address comments
* Update climate.py
* Migrate ephember
* Migrate Sensibo
* Implemented review comments (#24942)
* Migrate ESPHome
* Migrate MQTT
* Migrate Nest
* Migrate melissa
* Initial/partial migration of ST
* Migrate ST
* Remove Away mode (#24995)
* Migrate evohome, cache access tokens (#24491)
* add water_heater, add storage - initial commit
* add water_heater, add storage - initial commit
delint
add missing code
desiderata
update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
delint
* Add Broker, Water Heater & Refactor
add missing code
desiderata
* update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
* bugfix - loc_idx may not be 0
more refactor - ensure pure async
more refactoring
appears all r/o attributes are working
tweak precsion, DHW & delint
remove unused code
remove unused code 2
remove unused code, refactor _save_auth_tokens()
* support RoundThermostat
bugfix opmode, switch to util.dt, add until=1h
revert breaking change
* store at_expires as naive UTC
remove debug code
delint
tidy up exception handling
delint
add water_heater, add storage - initial commit
delint
add missing code
desiderata
update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
add water_heater, add storage - initial commit
delint
add missing code
desiderata
update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
delint
bugfix - loc_idx may not be 0
more refactor - ensure pure async
more refactoring
appears all r/o attributes are working
tweak precsion, DHW & delint
remove unused code
remove unused code 2
remove unused code, refactor _save_auth_tokens()
support RoundThermostat
bugfix opmode, switch to util.dt, add until=1h
revert breaking change
store at_expires as naive UTC
remove debug code
delint
tidy up exception handling
delint
* update CODEOWNERS
* fix regression
* fix requirements
* migrate to climate-1.0
* tweaking
* de-lint
* TCS working? & delint
* tweaking
* TCS code finalised
* remove available() logic
* refactor _switchpoints()
* tidy up switchpoint code
* tweak
* teaking device_state_attributes
* some refactoring
* move PRESET_CUSTOM back to evohome
* move CONF_ACCESS_TOKEN_EXPIRES CONF_REFRESH_TOKEN back to evohome
* refactor SP code and dt conversion
* delinted
* delinted
* remove water_heater
* fix regression
* Migrate homekit
* Cleanup away mode
* Fix tests
* add helpers
* fix tests melissa
* Fix nehueat
* fix zwave
* add more tests
* fix deconz
* Fix climate test emulate_hue
* fix tests
* fix dyson tests
* fix demo with new layout
* fix honeywell
* Switch homekit_controller to use HVAC_MODE_HEAT_COOL instead of HVAC_MODE_AUTO (#25009)
* Lint
* PyLint
* Pylint
* fix fritzbox tests
* Fix google
* Fix all tests
* Fix lint
* Fix auto for homekit like controler
* Fix lint
* fix lint
2019-07-08 12:00:24 +00:00
|
|
|
@property
|
|
|
|
def preset_mode(self):
|
2019-12-20 12:24:43 +00:00
|
|
|
"""Return the current preset mode (home, away)."""
|
2020-03-30 14:06:26 +00:00
|
|
|
if self._tado_zone_data.is_away:
|
Climate 1.0 (#23899)
* Climate 1.0 / part 1/2/3
* fix flake
* Lint
* Update Google Assistant
* ambiclimate to climate 1.0 (#24911)
* Fix Alexa
* Lint
* Migrate zhong_hong
* Migrate tuya
* Migrate honeywell to new climate schema (#24257)
* Update one
* Fix model climate v2
* Cleanup p4
* Add comfort hold mode
* Fix old code
* Update homeassistant/components/climate/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/components/climate/const.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* First renaming
* Rename operation to hvac for paulus
* Rename hold mode to preset mode
* Cleanup & update comments
* Remove on/off
* Fix supported feature count
* Update services
* Update demo
* Fix tests & use current_hvac
* Update comment
* Fix tests & add typing
* Add more typing
* Update modes
* Fix tests
* Cleanup low/high with range
* Update homematic part 1
* Finish homematic
* Fix lint
* fix hm mapping
* Support simple devices
* convert lcn
* migrate oem
* Fix xs1
* update hive
* update mil
* Update toon
* migrate deconz
* cleanup
* update tesla
* Fix lint
* Fix vera
* Migrate zwave
* Migrate velbus
* Cleanup humity feature
* Cleanup
* Migrate wink
* migrate dyson
* Fix current hvac
* Renaming
* Fix lint
* Migrate tfiac
* migrate tado
* Fix PRESET can be None
* apply PR#23913 from dev
* remove EU component, etc.
* remove EU component, etc.
* ready to test now
* de-linted
* some tweaks
* de-lint
* better handling of edge cases
* delint
* fix set_mode typos
* apply PR#23913 from dev
* remove EU component, etc.
* ready to test now
* de-linted
* some tweaks
* de-lint
* better handling of edge cases
* delint
* fix set_mode typos
* delint, move debug code
* away preset now working
* code tidy-up
* code tidy-up 2
* code tidy-up 3
* address issues #18932, #15063
* address issues #18932, #15063 - 2/2
* refactor MODE_AUTO to MODE_HEAT_COOL and use F not C
* add low/high to set_temp
* add low/high to set_temp 2
* add low/high to set_temp - delint
* run HA scripts
* port changes from PR #24402
* manual rebase
* manual rebase 2
* delint
* minor change
* remove SUPPORT_HVAC_ACTION
* Migrate radiotherm
* Convert touchline
* Migrate flexit
* Migrate nuheat
* Migrate maxcube
* Fix names maxcube const
* Migrate proliphix
* Migrate heatmiser
* Migrate fritzbox
* Migrate opentherm_gw
* Migrate venstar
* Migrate daikin
* Migrate modbus
* Fix elif
* Migrate Homematic IP Cloud to climate-1.0 (#24913)
* hmip climate fix
* Update hvac_mode and preset_mode
* fix lint
* Fix lint
* Migrate generic_thermostat
* Migrate incomfort to new climate schema (#24915)
* initial commit
* Update climate.py
* Migrate eq3btsmart
* Lint
* cleanup PRESET_MANUAL
* Migrate ecobee
* No conditional features
* KNX: Migrate climate component to new climate platform (#24931)
* Migrate climate component
* Remove unused code
* Corrected line length
* Lint
* Lint
* fix tests
* Fix value
* Migrate geniushub to new climate schema (#24191)
* Update one
* Fix model climate v2
* Cleanup p4
* Add comfort hold mode
* Fix old code
* Update homeassistant/components/climate/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/components/climate/const.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* First renaming
* Rename operation to hvac for paulus
* Rename hold mode to preset mode
* Cleanup & update comments
* Remove on/off
* Fix supported feature count
* Update services
* Update demo
* Fix tests & use current_hvac
* Update comment
* Fix tests & add typing
* Add more typing
* Update modes
* Fix tests
* Cleanup low/high with range
* Update homematic part 1
* Finish homematic
* Fix lint
* fix hm mapping
* Support simple devices
* convert lcn
* migrate oem
* Fix xs1
* update hive
* update mil
* Update toon
* migrate deconz
* cleanup
* update tesla
* Fix lint
* Fix vera
* Migrate zwave
* Migrate velbus
* Cleanup humity feature
* Cleanup
* Migrate wink
* migrate dyson
* Fix current hvac
* Renaming
* Fix lint
* Migrate tfiac
* migrate tado
* delinted
* delinted
* use latest client
* clean up mappings
* clean up mappings
* add duration to set_temperature
* add duration to set_temperature
* manual rebase
* tweak
* fix regression
* small fix
* fix rebase mixup
* address comments
* finish refactor
* fix regression
* tweak type hints
* delint
* manual rebase
* WIP: Fixes for honeywell migration to climate-1.0 (#24938)
* add type hints
* code tidy-up
* Fixes for incomfort migration to climate-1.0 (#24936)
* delint type hints
* no async unless await
* revert: no async unless await
* revert: no async unless await 2
* delint
* fix typo
* Fix homekit_controller on climate-1.0 (#24948)
* Fix tests on climate-1.0 branch
* As part of climate-1.0, make state return the heating-cooling.current characteristic
* Fixes from review
* lint
* Fix imports
* Migrate stibel_eltron
* Fix lint
* Migrate coolmaster to climate 1.0 (#24967)
* Migrate coolmaster to climate 1.0
* fix lint errors
* More lint fixes
* Fix demo to work with UI
* Migrate spider
* Demo update
* Updated frontend to 20190705.0
* Fix boost mode (#24980)
* Prepare Netatmo for climate 1.0 (#24973)
* Migration Netatmo
* Address comments
* Update climate.py
* Migrate ephember
* Migrate Sensibo
* Implemented review comments (#24942)
* Migrate ESPHome
* Migrate MQTT
* Migrate Nest
* Migrate melissa
* Initial/partial migration of ST
* Migrate ST
* Remove Away mode (#24995)
* Migrate evohome, cache access tokens (#24491)
* add water_heater, add storage - initial commit
* add water_heater, add storage - initial commit
delint
add missing code
desiderata
update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
delint
* Add Broker, Water Heater & Refactor
add missing code
desiderata
* update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
* bugfix - loc_idx may not be 0
more refactor - ensure pure async
more refactoring
appears all r/o attributes are working
tweak precsion, DHW & delint
remove unused code
remove unused code 2
remove unused code, refactor _save_auth_tokens()
* support RoundThermostat
bugfix opmode, switch to util.dt, add until=1h
revert breaking change
* store at_expires as naive UTC
remove debug code
delint
tidy up exception handling
delint
add water_heater, add storage - initial commit
delint
add missing code
desiderata
update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
add water_heater, add storage - initial commit
delint
add missing code
desiderata
update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
delint
bugfix - loc_idx may not be 0
more refactor - ensure pure async
more refactoring
appears all r/o attributes are working
tweak precsion, DHW & delint
remove unused code
remove unused code 2
remove unused code, refactor _save_auth_tokens()
support RoundThermostat
bugfix opmode, switch to util.dt, add until=1h
revert breaking change
store at_expires as naive UTC
remove debug code
delint
tidy up exception handling
delint
* update CODEOWNERS
* fix regression
* fix requirements
* migrate to climate-1.0
* tweaking
* de-lint
* TCS working? & delint
* tweaking
* TCS code finalised
* remove available() logic
* refactor _switchpoints()
* tidy up switchpoint code
* tweak
* teaking device_state_attributes
* some refactoring
* move PRESET_CUSTOM back to evohome
* move CONF_ACCESS_TOKEN_EXPIRES CONF_REFRESH_TOKEN back to evohome
* refactor SP code and dt conversion
* delinted
* delinted
* remove water_heater
* fix regression
* Migrate homekit
* Cleanup away mode
* Fix tests
* add helpers
* fix tests melissa
* Fix nehueat
* fix zwave
* add more tests
* fix deconz
* Fix climate test emulate_hue
* fix tests
* fix dyson tests
* fix demo with new layout
* fix honeywell
* Switch homekit_controller to use HVAC_MODE_HEAT_COOL instead of HVAC_MODE_AUTO (#25009)
* Lint
* PyLint
* Pylint
* fix fritzbox tests
* Fix google
* Fix all tests
* Fix lint
* Fix auto for homekit like controler
* Fix lint
* fix lint
2019-07-08 12:00:24 +00:00
|
|
|
return PRESET_AWAY
|
2019-08-12 04:02:16 +00:00
|
|
|
return PRESET_HOME
|
2017-06-23 16:45:44 +00:00
|
|
|
|
Climate 1.0 (#23899)
* Climate 1.0 / part 1/2/3
* fix flake
* Lint
* Update Google Assistant
* ambiclimate to climate 1.0 (#24911)
* Fix Alexa
* Lint
* Migrate zhong_hong
* Migrate tuya
* Migrate honeywell to new climate schema (#24257)
* Update one
* Fix model climate v2
* Cleanup p4
* Add comfort hold mode
* Fix old code
* Update homeassistant/components/climate/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/components/climate/const.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* First renaming
* Rename operation to hvac for paulus
* Rename hold mode to preset mode
* Cleanup & update comments
* Remove on/off
* Fix supported feature count
* Update services
* Update demo
* Fix tests & use current_hvac
* Update comment
* Fix tests & add typing
* Add more typing
* Update modes
* Fix tests
* Cleanup low/high with range
* Update homematic part 1
* Finish homematic
* Fix lint
* fix hm mapping
* Support simple devices
* convert lcn
* migrate oem
* Fix xs1
* update hive
* update mil
* Update toon
* migrate deconz
* cleanup
* update tesla
* Fix lint
* Fix vera
* Migrate zwave
* Migrate velbus
* Cleanup humity feature
* Cleanup
* Migrate wink
* migrate dyson
* Fix current hvac
* Renaming
* Fix lint
* Migrate tfiac
* migrate tado
* Fix PRESET can be None
* apply PR#23913 from dev
* remove EU component, etc.
* remove EU component, etc.
* ready to test now
* de-linted
* some tweaks
* de-lint
* better handling of edge cases
* delint
* fix set_mode typos
* apply PR#23913 from dev
* remove EU component, etc.
* ready to test now
* de-linted
* some tweaks
* de-lint
* better handling of edge cases
* delint
* fix set_mode typos
* delint, move debug code
* away preset now working
* code tidy-up
* code tidy-up 2
* code tidy-up 3
* address issues #18932, #15063
* address issues #18932, #15063 - 2/2
* refactor MODE_AUTO to MODE_HEAT_COOL and use F not C
* add low/high to set_temp
* add low/high to set_temp 2
* add low/high to set_temp - delint
* run HA scripts
* port changes from PR #24402
* manual rebase
* manual rebase 2
* delint
* minor change
* remove SUPPORT_HVAC_ACTION
* Migrate radiotherm
* Convert touchline
* Migrate flexit
* Migrate nuheat
* Migrate maxcube
* Fix names maxcube const
* Migrate proliphix
* Migrate heatmiser
* Migrate fritzbox
* Migrate opentherm_gw
* Migrate venstar
* Migrate daikin
* Migrate modbus
* Fix elif
* Migrate Homematic IP Cloud to climate-1.0 (#24913)
* hmip climate fix
* Update hvac_mode and preset_mode
* fix lint
* Fix lint
* Migrate generic_thermostat
* Migrate incomfort to new climate schema (#24915)
* initial commit
* Update climate.py
* Migrate eq3btsmart
* Lint
* cleanup PRESET_MANUAL
* Migrate ecobee
* No conditional features
* KNX: Migrate climate component to new climate platform (#24931)
* Migrate climate component
* Remove unused code
* Corrected line length
* Lint
* Lint
* fix tests
* Fix value
* Migrate geniushub to new climate schema (#24191)
* Update one
* Fix model climate v2
* Cleanup p4
* Add comfort hold mode
* Fix old code
* Update homeassistant/components/climate/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/components/climate/const.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* First renaming
* Rename operation to hvac for paulus
* Rename hold mode to preset mode
* Cleanup & update comments
* Remove on/off
* Fix supported feature count
* Update services
* Update demo
* Fix tests & use current_hvac
* Update comment
* Fix tests & add typing
* Add more typing
* Update modes
* Fix tests
* Cleanup low/high with range
* Update homematic part 1
* Finish homematic
* Fix lint
* fix hm mapping
* Support simple devices
* convert lcn
* migrate oem
* Fix xs1
* update hive
* update mil
* Update toon
* migrate deconz
* cleanup
* update tesla
* Fix lint
* Fix vera
* Migrate zwave
* Migrate velbus
* Cleanup humity feature
* Cleanup
* Migrate wink
* migrate dyson
* Fix current hvac
* Renaming
* Fix lint
* Migrate tfiac
* migrate tado
* delinted
* delinted
* use latest client
* clean up mappings
* clean up mappings
* add duration to set_temperature
* add duration to set_temperature
* manual rebase
* tweak
* fix regression
* small fix
* fix rebase mixup
* address comments
* finish refactor
* fix regression
* tweak type hints
* delint
* manual rebase
* WIP: Fixes for honeywell migration to climate-1.0 (#24938)
* add type hints
* code tidy-up
* Fixes for incomfort migration to climate-1.0 (#24936)
* delint type hints
* no async unless await
* revert: no async unless await
* revert: no async unless await 2
* delint
* fix typo
* Fix homekit_controller on climate-1.0 (#24948)
* Fix tests on climate-1.0 branch
* As part of climate-1.0, make state return the heating-cooling.current characteristic
* Fixes from review
* lint
* Fix imports
* Migrate stibel_eltron
* Fix lint
* Migrate coolmaster to climate 1.0 (#24967)
* Migrate coolmaster to climate 1.0
* fix lint errors
* More lint fixes
* Fix demo to work with UI
* Migrate spider
* Demo update
* Updated frontend to 20190705.0
* Fix boost mode (#24980)
* Prepare Netatmo for climate 1.0 (#24973)
* Migration Netatmo
* Address comments
* Update climate.py
* Migrate ephember
* Migrate Sensibo
* Implemented review comments (#24942)
* Migrate ESPHome
* Migrate MQTT
* Migrate Nest
* Migrate melissa
* Initial/partial migration of ST
* Migrate ST
* Remove Away mode (#24995)
* Migrate evohome, cache access tokens (#24491)
* add water_heater, add storage - initial commit
* add water_heater, add storage - initial commit
delint
add missing code
desiderata
update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
delint
* Add Broker, Water Heater & Refactor
add missing code
desiderata
* update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
* bugfix - loc_idx may not be 0
more refactor - ensure pure async
more refactoring
appears all r/o attributes are working
tweak precsion, DHW & delint
remove unused code
remove unused code 2
remove unused code, refactor _save_auth_tokens()
* support RoundThermostat
bugfix opmode, switch to util.dt, add until=1h
revert breaking change
* store at_expires as naive UTC
remove debug code
delint
tidy up exception handling
delint
add water_heater, add storage - initial commit
delint
add missing code
desiderata
update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
add water_heater, add storage - initial commit
delint
add missing code
desiderata
update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
delint
bugfix - loc_idx may not be 0
more refactor - ensure pure async
more refactoring
appears all r/o attributes are working
tweak precsion, DHW & delint
remove unused code
remove unused code 2
remove unused code, refactor _save_auth_tokens()
support RoundThermostat
bugfix opmode, switch to util.dt, add until=1h
revert breaking change
store at_expires as naive UTC
remove debug code
delint
tidy up exception handling
delint
* update CODEOWNERS
* fix regression
* fix requirements
* migrate to climate-1.0
* tweaking
* de-lint
* TCS working? & delint
* tweaking
* TCS code finalised
* remove available() logic
* refactor _switchpoints()
* tidy up switchpoint code
* tweak
* teaking device_state_attributes
* some refactoring
* move PRESET_CUSTOM back to evohome
* move CONF_ACCESS_TOKEN_EXPIRES CONF_REFRESH_TOKEN back to evohome
* refactor SP code and dt conversion
* delinted
* delinted
* remove water_heater
* fix regression
* Migrate homekit
* Cleanup away mode
* Fix tests
* add helpers
* fix tests melissa
* Fix nehueat
* fix zwave
* add more tests
* fix deconz
* Fix climate test emulate_hue
* fix tests
* fix dyson tests
* fix demo with new layout
* fix honeywell
* Switch homekit_controller to use HVAC_MODE_HEAT_COOL instead of HVAC_MODE_AUTO (#25009)
* Lint
* PyLint
* Pylint
* fix fritzbox tests
* Fix google
* Fix all tests
* Fix lint
* Fix auto for homekit like controler
* Fix lint
* fix lint
2019-07-08 12:00:24 +00:00
|
|
|
@property
|
|
|
|
def preset_modes(self):
|
|
|
|
"""Return a list of available preset modes."""
|
|
|
|
return SUPPORT_PRESET
|
|
|
|
|
2019-08-12 04:02:16 +00:00
|
|
|
def set_preset_mode(self, preset_mode):
|
|
|
|
"""Set new preset mode."""
|
2020-03-23 15:40:15 +00:00
|
|
|
self._tado.set_presence(preset_mode)
|
2019-08-12 04:02:16 +00:00
|
|
|
|
2017-03-22 12:18:13 +00:00
|
|
|
@property
|
|
|
|
def temperature_unit(self):
|
2017-04-30 05:04:49 +00:00
|
|
|
"""Return the unit of measurement used by the platform."""
|
2019-12-20 12:24:43 +00:00
|
|
|
return TEMP_CELSIUS
|
2017-03-22 12:18:13 +00:00
|
|
|
|
2018-01-11 09:49:41 +00:00
|
|
|
@property
|
|
|
|
def target_temperature_step(self):
|
|
|
|
"""Return the supported step of target temperature."""
|
2020-03-30 14:06:26 +00:00
|
|
|
if self._tado_zone_data.current_hvac_mode == CONST_MODE_COOL:
|
|
|
|
return self._cool_step or self._heat_step
|
|
|
|
return self._heat_step or self._cool_step
|
2018-01-11 09:49:41 +00:00
|
|
|
|
2017-03-22 12:18:13 +00:00
|
|
|
@property
|
|
|
|
def target_temperature(self):
|
|
|
|
"""Return the temperature we try to reach."""
|
2020-03-30 14:06:26 +00:00
|
|
|
# If the target temperature will be None
|
|
|
|
# if the device is performing an action
|
|
|
|
# that does not affect the temperature or
|
|
|
|
# the device is switching states
|
|
|
|
return self._tado_zone_data.target_temp or self._tado_zone_data.current_temp
|
2017-03-22 12:18:13 +00:00
|
|
|
|
2020-07-05 19:43:52 +00:00
|
|
|
def set_timer(self, time_period, temperature=None):
|
|
|
|
"""Set the timer on the entity, and temperature if supported."""
|
|
|
|
|
|
|
|
self._control_hvac(
|
|
|
|
hvac_mode=CONST_MODE_HEAT, target_temp=temperature, duration=time_period
|
|
|
|
)
|
|
|
|
|
2021-01-26 08:11:29 +00:00
|
|
|
def set_temp_offset(self, offset):
|
|
|
|
"""Set offset on the entity."""
|
|
|
|
|
|
|
|
_LOGGER.debug(
|
|
|
|
"Setting temperature offset for device %s setting to (%d)",
|
|
|
|
self._device_id,
|
|
|
|
offset,
|
|
|
|
)
|
|
|
|
|
|
|
|
self._tado.set_temperature_offset(self._device_id, offset)
|
|
|
|
|
2017-03-22 12:18:13 +00:00
|
|
|
def set_temperature(self, **kwargs):
|
|
|
|
"""Set new target temperature."""
|
2021-10-30 14:33:42 +00:00
|
|
|
if (temperature := kwargs.get(ATTR_TEMPERATURE)) is None:
|
2017-03-22 12:18:13 +00:00
|
|
|
return
|
|
|
|
|
2020-03-30 14:06:26 +00:00
|
|
|
if self._current_tado_hvac_mode not in (
|
|
|
|
CONST_MODE_OFF,
|
|
|
|
CONST_MODE_AUTO,
|
|
|
|
CONST_MODE_SMART_SCHEDULE,
|
|
|
|
):
|
|
|
|
self._control_hvac(target_temp=temperature)
|
|
|
|
return
|
|
|
|
|
|
|
|
new_hvac_mode = CONST_MODE_COOL if self._ac_device else CONST_MODE_HEAT
|
|
|
|
self._control_hvac(target_temp=temperature, hvac_mode=new_hvac_mode)
|
2017-03-22 12:18:13 +00:00
|
|
|
|
Climate 1.0 (#23899)
* Climate 1.0 / part 1/2/3
* fix flake
* Lint
* Update Google Assistant
* ambiclimate to climate 1.0 (#24911)
* Fix Alexa
* Lint
* Migrate zhong_hong
* Migrate tuya
* Migrate honeywell to new climate schema (#24257)
* Update one
* Fix model climate v2
* Cleanup p4
* Add comfort hold mode
* Fix old code
* Update homeassistant/components/climate/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/components/climate/const.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* First renaming
* Rename operation to hvac for paulus
* Rename hold mode to preset mode
* Cleanup & update comments
* Remove on/off
* Fix supported feature count
* Update services
* Update demo
* Fix tests & use current_hvac
* Update comment
* Fix tests & add typing
* Add more typing
* Update modes
* Fix tests
* Cleanup low/high with range
* Update homematic part 1
* Finish homematic
* Fix lint
* fix hm mapping
* Support simple devices
* convert lcn
* migrate oem
* Fix xs1
* update hive
* update mil
* Update toon
* migrate deconz
* cleanup
* update tesla
* Fix lint
* Fix vera
* Migrate zwave
* Migrate velbus
* Cleanup humity feature
* Cleanup
* Migrate wink
* migrate dyson
* Fix current hvac
* Renaming
* Fix lint
* Migrate tfiac
* migrate tado
* Fix PRESET can be None
* apply PR#23913 from dev
* remove EU component, etc.
* remove EU component, etc.
* ready to test now
* de-linted
* some tweaks
* de-lint
* better handling of edge cases
* delint
* fix set_mode typos
* apply PR#23913 from dev
* remove EU component, etc.
* ready to test now
* de-linted
* some tweaks
* de-lint
* better handling of edge cases
* delint
* fix set_mode typos
* delint, move debug code
* away preset now working
* code tidy-up
* code tidy-up 2
* code tidy-up 3
* address issues #18932, #15063
* address issues #18932, #15063 - 2/2
* refactor MODE_AUTO to MODE_HEAT_COOL and use F not C
* add low/high to set_temp
* add low/high to set_temp 2
* add low/high to set_temp - delint
* run HA scripts
* port changes from PR #24402
* manual rebase
* manual rebase 2
* delint
* minor change
* remove SUPPORT_HVAC_ACTION
* Migrate radiotherm
* Convert touchline
* Migrate flexit
* Migrate nuheat
* Migrate maxcube
* Fix names maxcube const
* Migrate proliphix
* Migrate heatmiser
* Migrate fritzbox
* Migrate opentherm_gw
* Migrate venstar
* Migrate daikin
* Migrate modbus
* Fix elif
* Migrate Homematic IP Cloud to climate-1.0 (#24913)
* hmip climate fix
* Update hvac_mode and preset_mode
* fix lint
* Fix lint
* Migrate generic_thermostat
* Migrate incomfort to new climate schema (#24915)
* initial commit
* Update climate.py
* Migrate eq3btsmart
* Lint
* cleanup PRESET_MANUAL
* Migrate ecobee
* No conditional features
* KNX: Migrate climate component to new climate platform (#24931)
* Migrate climate component
* Remove unused code
* Corrected line length
* Lint
* Lint
* fix tests
* Fix value
* Migrate geniushub to new climate schema (#24191)
* Update one
* Fix model climate v2
* Cleanup p4
* Add comfort hold mode
* Fix old code
* Update homeassistant/components/climate/__init__.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* Update homeassistant/components/climate/const.py
Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
* First renaming
* Rename operation to hvac for paulus
* Rename hold mode to preset mode
* Cleanup & update comments
* Remove on/off
* Fix supported feature count
* Update services
* Update demo
* Fix tests & use current_hvac
* Update comment
* Fix tests & add typing
* Add more typing
* Update modes
* Fix tests
* Cleanup low/high with range
* Update homematic part 1
* Finish homematic
* Fix lint
* fix hm mapping
* Support simple devices
* convert lcn
* migrate oem
* Fix xs1
* update hive
* update mil
* Update toon
* migrate deconz
* cleanup
* update tesla
* Fix lint
* Fix vera
* Migrate zwave
* Migrate velbus
* Cleanup humity feature
* Cleanup
* Migrate wink
* migrate dyson
* Fix current hvac
* Renaming
* Fix lint
* Migrate tfiac
* migrate tado
* delinted
* delinted
* use latest client
* clean up mappings
* clean up mappings
* add duration to set_temperature
* add duration to set_temperature
* manual rebase
* tweak
* fix regression
* small fix
* fix rebase mixup
* address comments
* finish refactor
* fix regression
* tweak type hints
* delint
* manual rebase
* WIP: Fixes for honeywell migration to climate-1.0 (#24938)
* add type hints
* code tidy-up
* Fixes for incomfort migration to climate-1.0 (#24936)
* delint type hints
* no async unless await
* revert: no async unless await
* revert: no async unless await 2
* delint
* fix typo
* Fix homekit_controller on climate-1.0 (#24948)
* Fix tests on climate-1.0 branch
* As part of climate-1.0, make state return the heating-cooling.current characteristic
* Fixes from review
* lint
* Fix imports
* Migrate stibel_eltron
* Fix lint
* Migrate coolmaster to climate 1.0 (#24967)
* Migrate coolmaster to climate 1.0
* fix lint errors
* More lint fixes
* Fix demo to work with UI
* Migrate spider
* Demo update
* Updated frontend to 20190705.0
* Fix boost mode (#24980)
* Prepare Netatmo for climate 1.0 (#24973)
* Migration Netatmo
* Address comments
* Update climate.py
* Migrate ephember
* Migrate Sensibo
* Implemented review comments (#24942)
* Migrate ESPHome
* Migrate MQTT
* Migrate Nest
* Migrate melissa
* Initial/partial migration of ST
* Migrate ST
* Remove Away mode (#24995)
* Migrate evohome, cache access tokens (#24491)
* add water_heater, add storage - initial commit
* add water_heater, add storage - initial commit
delint
add missing code
desiderata
update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
delint
* Add Broker, Water Heater & Refactor
add missing code
desiderata
* update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
* bugfix - loc_idx may not be 0
more refactor - ensure pure async
more refactoring
appears all r/o attributes are working
tweak precsion, DHW & delint
remove unused code
remove unused code 2
remove unused code, refactor _save_auth_tokens()
* support RoundThermostat
bugfix opmode, switch to util.dt, add until=1h
revert breaking change
* store at_expires as naive UTC
remove debug code
delint
tidy up exception handling
delint
add water_heater, add storage - initial commit
delint
add missing code
desiderata
update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
add water_heater, add storage - initial commit
delint
add missing code
desiderata
update honeywell client library & CODEOWNER
add auth_tokens code, refactor & delint
refactor for broker
delint
bugfix - loc_idx may not be 0
more refactor - ensure pure async
more refactoring
appears all r/o attributes are working
tweak precsion, DHW & delint
remove unused code
remove unused code 2
remove unused code, refactor _save_auth_tokens()
support RoundThermostat
bugfix opmode, switch to util.dt, add until=1h
revert breaking change
store at_expires as naive UTC
remove debug code
delint
tidy up exception handling
delint
* update CODEOWNERS
* fix regression
* fix requirements
* migrate to climate-1.0
* tweaking
* de-lint
* TCS working? & delint
* tweaking
* TCS code finalised
* remove available() logic
* refactor _switchpoints()
* tidy up switchpoint code
* tweak
* teaking device_state_attributes
* some refactoring
* move PRESET_CUSTOM back to evohome
* move CONF_ACCESS_TOKEN_EXPIRES CONF_REFRESH_TOKEN back to evohome
* refactor SP code and dt conversion
* delinted
* delinted
* remove water_heater
* fix regression
* Migrate homekit
* Cleanup away mode
* Fix tests
* add helpers
* fix tests melissa
* Fix nehueat
* fix zwave
* add more tests
* fix deconz
* Fix climate test emulate_hue
* fix tests
* fix dyson tests
* fix demo with new layout
* fix honeywell
* Switch homekit_controller to use HVAC_MODE_HEAT_COOL instead of HVAC_MODE_AUTO (#25009)
* Lint
* PyLint
* Pylint
* fix fritzbox tests
* Fix google
* Fix all tests
* Fix lint
* Fix auto for homekit like controler
* Fix lint
* fix lint
2019-07-08 12:00:24 +00:00
|
|
|
def set_hvac_mode(self, hvac_mode):
|
|
|
|
"""Set new target hvac mode."""
|
2019-12-20 12:24:43 +00:00
|
|
|
|
2020-03-30 14:06:26 +00:00
|
|
|
self._control_hvac(hvac_mode=HA_TO_TADO_HVAC_MODE_MAP[hvac_mode])
|
2019-12-20 12:24:43 +00:00
|
|
|
|
2020-03-30 14:06:26 +00:00
|
|
|
@property
|
|
|
|
def available(self):
|
|
|
|
"""Return if the device is available."""
|
|
|
|
return self._tado_zone_data.available
|
2017-03-22 12:18:13 +00:00
|
|
|
|
|
|
|
@property
|
|
|
|
def min_temp(self):
|
|
|
|
"""Return the minimum temperature."""
|
2020-03-30 14:06:26 +00:00
|
|
|
if (
|
|
|
|
self._current_tado_hvac_mode == CONST_MODE_COOL
|
|
|
|
and self._cool_min_temp is not None
|
|
|
|
):
|
|
|
|
return self._cool_min_temp
|
|
|
|
if self._heat_min_temp is not None:
|
|
|
|
return self._heat_min_temp
|
|
|
|
|
|
|
|
return self._cool_min_temp
|
2017-03-22 12:18:13 +00:00
|
|
|
|
|
|
|
@property
|
|
|
|
def max_temp(self):
|
|
|
|
"""Return the maximum temperature."""
|
2020-03-30 14:06:26 +00:00
|
|
|
if (
|
|
|
|
self._current_tado_hvac_mode == CONST_MODE_HEAT
|
|
|
|
and self._heat_max_temp is not None
|
|
|
|
):
|
|
|
|
return self._heat_max_temp
|
|
|
|
if self._heat_max_temp is not None:
|
|
|
|
return self._heat_max_temp
|
|
|
|
|
|
|
|
return self._heat_max_temp
|
|
|
|
|
2020-03-31 22:29:45 +00:00
|
|
|
@property
|
|
|
|
def swing_mode(self):
|
|
|
|
"""Active swing mode for the device."""
|
|
|
|
return self._current_tado_swing_mode
|
|
|
|
|
|
|
|
@property
|
|
|
|
def swing_modes(self):
|
|
|
|
"""Swing modes for the device."""
|
|
|
|
if self._support_flags & SUPPORT_SWING_MODE:
|
2020-04-19 10:17:06 +00:00
|
|
|
return [TADO_SWING_ON, TADO_SWING_OFF]
|
2020-03-31 22:29:45 +00:00
|
|
|
return None
|
|
|
|
|
2021-01-26 08:11:29 +00:00
|
|
|
@property
|
2021-03-11 19:16:26 +00:00
|
|
|
def extra_state_attributes(self):
|
2021-01-26 08:11:29 +00:00
|
|
|
"""Return temperature offset."""
|
|
|
|
return self._tado_zone_temp_offset
|
|
|
|
|
2020-03-31 22:29:45 +00:00
|
|
|
def set_swing_mode(self, swing_mode):
|
|
|
|
"""Set swing modes for the device."""
|
|
|
|
self._control_hvac(swing_mode=swing_mode)
|
|
|
|
|
2020-03-30 14:06:26 +00:00
|
|
|
@callback
|
|
|
|
def _async_update_zone_data(self):
|
|
|
|
"""Load tado data into zone."""
|
|
|
|
self._tado_zone_data = self._tado.data["zone"][self.zone_id]
|
2021-01-26 08:11:29 +00:00
|
|
|
# Assign offset values to mapped attributes
|
|
|
|
for offset_key, attr in TADO_TO_HA_OFFSET_MAP.items():
|
|
|
|
if (
|
|
|
|
self._device_id in self._tado.data["device"]
|
|
|
|
and offset_key
|
|
|
|
in self._tado.data["device"][self._device_id][TEMP_OFFSET]
|
|
|
|
):
|
|
|
|
self._tado_zone_temp_offset[attr] = self._tado.data["device"][
|
|
|
|
self._device_id
|
|
|
|
][TEMP_OFFSET][offset_key]
|
2020-03-30 14:06:26 +00:00
|
|
|
self._current_tado_fan_speed = self._tado_zone_data.current_fan_speed
|
|
|
|
self._current_tado_hvac_mode = self._tado_zone_data.current_hvac_mode
|
|
|
|
self._current_tado_hvac_action = self._tado_zone_data.current_hvac_action
|
2020-04-19 10:17:06 +00:00
|
|
|
self._current_tado_swing_mode = self._tado_zone_data.current_swing_mode
|
2020-03-30 14:06:26 +00:00
|
|
|
|
|
|
|
@callback
|
|
|
|
def _async_update_callback(self):
|
|
|
|
"""Load tado data and update state."""
|
|
|
|
self._async_update_zone_data()
|
|
|
|
self.async_write_ha_state()
|
|
|
|
|
|
|
|
def _normalize_target_temp_for_hvac_mode(self):
|
|
|
|
# Set a target temperature if we don't have any
|
|
|
|
# This can happen when we switch from Off to On
|
|
|
|
if self._target_temp is None:
|
|
|
|
self._target_temp = self._tado_zone_data.current_temp
|
|
|
|
elif self._current_tado_hvac_mode == CONST_MODE_COOL:
|
|
|
|
if self._target_temp > self._cool_max_temp:
|
|
|
|
self._target_temp = self._cool_max_temp
|
|
|
|
elif self._target_temp < self._cool_min_temp:
|
|
|
|
self._target_temp = self._cool_min_temp
|
|
|
|
elif self._current_tado_hvac_mode == CONST_MODE_HEAT:
|
|
|
|
if self._target_temp > self._heat_max_temp:
|
|
|
|
self._target_temp = self._heat_max_temp
|
|
|
|
elif self._target_temp < self._heat_min_temp:
|
|
|
|
self._target_temp = self._heat_min_temp
|
|
|
|
|
2020-03-31 22:29:45 +00:00
|
|
|
def _control_hvac(
|
2020-07-05 19:43:52 +00:00
|
|
|
self,
|
|
|
|
hvac_mode=None,
|
|
|
|
target_temp=None,
|
|
|
|
fan_mode=None,
|
|
|
|
swing_mode=None,
|
|
|
|
duration=None,
|
2020-03-31 22:29:45 +00:00
|
|
|
):
|
2020-03-30 14:06:26 +00:00
|
|
|
"""Send new target temperature to Tado."""
|
2017-03-22 12:18:13 +00:00
|
|
|
|
2020-03-30 14:06:26 +00:00
|
|
|
if hvac_mode:
|
|
|
|
self._current_tado_hvac_mode = hvac_mode
|
2017-03-22 12:18:13 +00:00
|
|
|
|
2020-03-30 14:06:26 +00:00
|
|
|
if target_temp:
|
|
|
|
self._target_temp = target_temp
|
2017-06-23 16:45:44 +00:00
|
|
|
|
2020-03-30 14:06:26 +00:00
|
|
|
if fan_mode:
|
|
|
|
self._current_tado_fan_speed = fan_mode
|
2017-06-23 16:45:44 +00:00
|
|
|
|
2020-03-31 22:29:45 +00:00
|
|
|
if swing_mode:
|
|
|
|
self._current_tado_swing_mode = swing_mode
|
|
|
|
|
2020-03-30 14:06:26 +00:00
|
|
|
self._normalize_target_temp_for_hvac_mode()
|
2017-03-22 12:18:13 +00:00
|
|
|
|
2020-03-30 14:06:26 +00:00
|
|
|
# tado does not permit setting the fan speed to
|
|
|
|
# off, you must turn off the device
|
2020-02-15 16:08:21 +00:00
|
|
|
if (
|
2020-03-30 14:06:26 +00:00
|
|
|
self._current_tado_fan_speed == CONST_FAN_OFF
|
|
|
|
and self._current_tado_hvac_mode != CONST_MODE_OFF
|
2020-02-15 16:08:21 +00:00
|
|
|
):
|
2020-03-30 14:06:26 +00:00
|
|
|
self._current_tado_fan_speed = CONST_FAN_AUTO
|
|
|
|
|
|
|
|
if self._current_tado_hvac_mode == CONST_MODE_OFF:
|
2019-12-20 12:24:43 +00:00
|
|
|
_LOGGER.debug(
|
2020-03-30 14:06:26 +00:00
|
|
|
"Switching to OFF for zone %s (%d)", self.zone_name, self.zone_id
|
2019-12-20 12:24:43 +00:00
|
|
|
)
|
2020-03-30 14:06:26 +00:00
|
|
|
self._tado.set_zone_off(self.zone_id, CONST_OVERLAY_MANUAL, self.zone_type)
|
2020-03-10 08:32:56 +00:00
|
|
|
return
|
|
|
|
|
2020-03-30 14:06:26 +00:00
|
|
|
if self._current_tado_hvac_mode == CONST_MODE_SMART_SCHEDULE:
|
2020-03-10 08:32:56 +00:00
|
|
|
_LOGGER.debug(
|
2020-03-30 14:06:26 +00:00
|
|
|
"Switching to SMART_SCHEDULE for zone %s (%d)",
|
|
|
|
self.zone_name,
|
|
|
|
self.zone_id,
|
2020-03-10 08:32:56 +00:00
|
|
|
)
|
2020-03-30 14:06:26 +00:00
|
|
|
self._tado.reset_zone_overlay(self.zone_id)
|
2017-03-22 12:18:13 +00:00
|
|
|
return
|
|
|
|
|
2019-12-20 12:24:43 +00:00
|
|
|
_LOGGER.debug(
|
2020-07-05 19:43:52 +00:00
|
|
|
"Switching to %s for zone %s (%d) with temperature %s °C and duration %s",
|
2020-03-30 14:06:26 +00:00
|
|
|
self._current_tado_hvac_mode,
|
2019-12-20 12:24:43 +00:00
|
|
|
self.zone_name,
|
|
|
|
self.zone_id,
|
|
|
|
self._target_temp,
|
2020-07-05 19:43:52 +00:00
|
|
|
duration,
|
2019-12-20 12:24:43 +00:00
|
|
|
)
|
2020-03-30 14:06:26 +00:00
|
|
|
|
2020-07-05 19:43:52 +00:00
|
|
|
overlay_mode = CONST_OVERLAY_MANUAL
|
|
|
|
if duration:
|
|
|
|
overlay_mode = CONST_OVERLAY_TIMER
|
|
|
|
elif self._tado.fallback:
|
|
|
|
# Fallback to Smart Schedule at next Schedule switch if we have fallback enabled
|
|
|
|
overlay_mode = CONST_OVERLAY_TADO_MODE
|
2020-03-30 14:06:26 +00:00
|
|
|
|
|
|
|
temperature_to_send = self._target_temp
|
|
|
|
if self._current_tado_hvac_mode in TADO_MODES_WITH_NO_TEMP_SETTING:
|
|
|
|
# A temperature cannot be passed with these modes
|
|
|
|
temperature_to_send = None
|
|
|
|
|
2020-03-31 22:29:45 +00:00
|
|
|
fan_speed = None
|
|
|
|
if self._support_flags & SUPPORT_FAN_MODE:
|
|
|
|
fan_speed = self._current_tado_fan_speed
|
|
|
|
swing = None
|
|
|
|
if self._support_flags & SUPPORT_SWING_MODE:
|
|
|
|
swing = self._current_tado_swing_mode
|
|
|
|
|
2019-12-20 12:24:43 +00:00
|
|
|
self._tado.set_zone_overlay(
|
2020-03-30 14:06:26 +00:00
|
|
|
zone_id=self.zone_id,
|
|
|
|
overlay_mode=overlay_mode, # What to do when the period ends
|
|
|
|
temperature=temperature_to_send,
|
2020-07-05 19:43:52 +00:00
|
|
|
duration=duration,
|
2020-03-30 14:06:26 +00:00
|
|
|
device_type=self.zone_type,
|
|
|
|
mode=self._current_tado_hvac_mode,
|
2020-03-31 22:29:45 +00:00
|
|
|
fan_speed=fan_speed, # api defaults to not sending fanSpeed if None specified
|
|
|
|
swing=swing, # api defaults to not sending swing if None specified
|
2019-12-20 12:24:43 +00:00
|
|
|
)
|