fix cover state issue

This commit is contained in:
regevbr authored and rospogrigio committed 2021-10-01 11:03:20 +02:00
1 parent 5e71ee4ae8
commit 62327629a6
1 file changed
+3 -2
+3 -2
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