From d8119b2281d742c6120c195b5e04b390b76d997b Mon Sep 17 00:00:00 2001 From: Wolfgang Malgadey Date: Fri, 5 Apr 2019 02:52:06 +0200 Subject: [PATCH] Fix tado turn on off (#22291) * fix for turn on and off, with new pyTado missing blank line * removed, because can't push * uploaded the file through github again --- homeassistant/components/tado/__init__.py | 5 +++++ homeassistant/components/tado/climate.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/tado/__init__.py b/homeassistant/components/tado/__init__.py index 6808729685e..8d3f541972e 100644 --- a/homeassistant/components/tado/__init__.py +++ b/homeassistant/components/tado/__init__.py @@ -121,3 +121,8 @@ class TadoDataStore: """Wrap for setZoneOverlay(..).""" self.tado.setZoneOverlay(zone_id, mode, temperature, duration) self.update(no_throttle=True) # pylint: disable=unexpected-keyword-arg + + def set_zone_off(self, zone_id, mode): + """Set a zone to off.""" + self.tado.setZoneOverlay(zone_id, mode, None, None, 'HEATING', 'OFF') + self.update(no_throttle=True) # pylint: disable=unexpected-keyword-arg diff --git a/homeassistant/components/tado/climate.py b/homeassistant/components/tado/climate.py index 56c670184b5..90d5f076974 100644 --- a/homeassistant/components/tado/climate.py +++ b/homeassistant/components/tado/climate.py @@ -363,7 +363,7 @@ class TadoClimate(ClimateDevice): if self._current_operation == CONST_MODE_OFF: _LOGGER.info("Switching mytado.com to OFF for zone %s", self.zone_name) - self._store.set_zone_overlay(self.zone_id, CONST_OVERLAY_MANUAL) + self._store.set_zone_off(self.zone_id, CONST_OVERLAY_MANUAL) self._overlay_mode = self._current_operation return