Tado fixes (#11294)

* Fix tado overlay end state

Previously, when tado ended an overlay state itself, say because a timer
expired or a scheduled temperature change ocurred, the tado climate
component would not return to Smart Schedule mode. This change fixes
that issue

* Correct tado state after multiple rapid updates

Previosuly, making two changes to tado climate within 10 seconds, for
example setting operation mode to Tado mode, then changing the
temperature, would leave the entity showing the incorrect state for up
to a minute.

This change forces an unthrottled update after setting the climate
state, which fixes the issue

* Fix comment formatting
This commit is contained in:
Nigel Rook 2018-02-03 01:28:54 +00:00 committed by Paulus Schoutsen
parent 2cbab48e1b
commit c204a7c787
2 changed files with 5 additions and 3 deletions

View File

@ -294,7 +294,7 @@ class TadoClimate(ClimateDevice):
overlay = False
overlay_data = None
termination = self._current_operation
termination = CONST_MODE_SMART_SCHEDULE
cooling = False
fan_speed = CONST_MODE_OFF

View File

@ -119,8 +119,10 @@ class TadoDataStore:
def reset_zone_overlay(self, zone_id):
"""Wrap for resetZoneOverlay(..)."""
return self.tado.resetZoneOverlay(zone_id)
self.tado.resetZoneOverlay(zone_id)
self.update(no_throttle=True) # pylint: disable=unexpected-keyword-arg
def set_zone_overlay(self, zone_id, mode, temperature=None, duration=None):
"""Wrap for setZoneOverlay(..)."""
return self.tado.setZoneOverlay(zone_id, mode, temperature, duration)
self.tado.setZoneOverlay(zone_id, mode, temperature, duration)
self.update(no_throttle=True) # pylint: disable=unexpected-keyword-arg