Fix fibaro cover state (#73921)

This commit is contained in:
rappenze 2022-06-25 12:34:30 +02:00 committed by GitHub
parent 9eed8b2ef4
commit eb6afd27b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -93,6 +93,11 @@ class FibaroCover(FibaroDevice, CoverEntity):
def is_closed(self) -> bool | None:
"""Return if the cover is closed."""
if self._is_open_close_only():
if (
"state" not in self.fibaro_device.properties
or self.fibaro_device.properties.state.lower() == "unknown"
):
return None
return self.fibaro_device.properties.state.lower() == "closed"
if self.current_cover_position is None: