Fix closed status for non horizontal awnings. (#26840)

pull/27374/head
Pierre Sicot 2019-10-05 22:28:19 +02:00 committed by Paulus Schoutsen
parent 1e1f79e45b
commit 2ccd0039d7
1 changed files with 1 additions and 2 deletions

View File

@ -137,14 +137,13 @@ class TahomaCover(TahomaDevice, CoverDevice):
if self._closure is not None:
if self.tahoma_device.type == HORIZONTAL_AWNING:
self._position = self._closure
self._closed = self._position == 0
else:
self._position = 100 - self._closure
self._closed = self._position == 100
if self._position <= 5:
self._position = 0
if self._position >= 95:
self._position = 100
self._closed = self._position == 0
else:
self._position = None
if "core:OpenClosedState" in self.tahoma_device.active_states: