Add tado zone variable open window detected (#34969)

* openwindow0: this is the part for the HA itself

* Update homeassistant/components/tado/sensor.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/tado/sensor.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* new version after review

Co-authored-by: J. Nick Koston <nick@koston.org>
pull/35637/head
isk0001y 2020-05-14 21:48:34 +02:00 committed by GitHub
parent fca09b2615
commit 626f72b97a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -222,7 +222,10 @@ class TadoZoneSensor(TadoZoneEntity, Entity):
self._state = self._tado_zone_data.preparation
elif self.zone_variable == "open window":
self._state = self._tado_zone_data.open_window
self._state = bool(
self._tado_zone_data.open_window
or self._tado_zone_data.open_window_detected
)
self._state_attributes = self._tado_zone_data.open_window_attr