fix cover state issue

This commit is contained in:
regevbr
2021-09-30 14:11:49 +03:00
committed by rospogrigio
parent 5e71ee4ae8
commit 62327629a6

View File

@@ -109,9 +109,10 @@ class LocaltuyaCover(LocalTuyaEntity, CoverEntity):
"""Return if the cover is closed or not."""
if self._config[CONF_POSITIONING_MODE] == COVER_MODE_NONE:
return None
elif self._current_cover_position == 0:
if self._current_cover_position == 0:
return True
elif self._current_cover_position == 100:
if self._current_cover_position == 100:
return False
return None