mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Fix closed status for non horizontal awnings. (#26840)
This commit is contained in:
parent
99859485e2
commit
43d1413050
@ -137,14 +137,13 @@ class TahomaCover(TahomaDevice, CoverDevice):
|
|||||||
if self._closure is not None:
|
if self._closure is not None:
|
||||||
if self.tahoma_device.type == HORIZONTAL_AWNING:
|
if self.tahoma_device.type == HORIZONTAL_AWNING:
|
||||||
self._position = self._closure
|
self._position = self._closure
|
||||||
self._closed = self._position == 0
|
|
||||||
else:
|
else:
|
||||||
self._position = 100 - self._closure
|
self._position = 100 - self._closure
|
||||||
self._closed = self._position == 100
|
|
||||||
if self._position <= 5:
|
if self._position <= 5:
|
||||||
self._position = 0
|
self._position = 0
|
||||||
if self._position >= 95:
|
if self._position >= 95:
|
||||||
self._position = 100
|
self._position = 100
|
||||||
|
self._closed = self._position == 0
|
||||||
else:
|
else:
|
||||||
self._position = None
|
self._position = None
|
||||||
if "core:OpenClosedState" in self.tahoma_device.active_states:
|
if "core:OpenClosedState" in self.tahoma_device.active_states:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user