Add an early start sensor for heating zones (#28732)

pull/29046/head
Josh Anderson 2019-11-25 08:13:59 +00:00 committed by Michaël Arnauts
parent 48c289fad3
commit 8fade79a0a
1 changed files with 7 additions and 0 deletions

View File

@ -20,6 +20,7 @@ CLIMATE_HEAT_SENSOR_TYPES = [
"heating",
"tado mode",
"overlay",
"early start",
]
CLIMATE_COOL_SENSOR_TYPES = [
@ -252,3 +253,9 @@ class TadoSensor(Entity):
else:
self._state = False
self._state_attributes = {}
elif self.zone_variable == "early start":
if "preparation" in data and data["preparation"] is not None:
self._state = True
else:
self._state = False