Fix KNX cover state return open when unknown (#44926)

This commit is contained in:
Matthias Alphart
2021-01-08 11:50:02 +01:00
committed by GitHub
parent e35e460e69
commit 30189fb5d5

View File

@@ -79,6 +79,9 @@ class KNXCover(KnxEntity, CoverEntity):
@property
def is_closed(self):
"""Return if the cover is closed."""
# state shall be "unknown" when xknx travelcalculator is not initialized
if self._device.current_position() is None:
return None
return self._device.is_closed()
@property