Add an open window sensor for heating zones (#30090)

This commit is contained in:
gppanayotov 2019-12-20 20:02:46 +02:00 committed by Michaël Arnauts
parent 04b5d6c697
commit 84e1b3d07f

View File

@ -21,6 +21,7 @@ ZONE_SENSORS = {
"tado mode", "tado mode",
"overlay", "overlay",
"early start", "early start",
"open window",
], ],
TYPE_AIR_CONDITIONING: [ TYPE_AIR_CONDITIONING: [
"temperature", "temperature",
@ -240,3 +241,9 @@ class TadoSensor(Entity):
self._state = True self._state = True
else: else:
self._state = False self._state = False
elif self.zone_variable == "open window":
if "openWindowDetected" in data:
self._state = data["openWindowDetected"]
else:
self._state = False