Fix for unknown state of covers/shutters
This commit is contained in:
@@ -108,13 +108,13 @@ class LocaltuyaCover(LocalTuyaEntity, CoverEntity):
|
|||||||
def is_closed(self):
|
def is_closed(self):
|
||||||
"""Return if the cover is closed or not."""
|
"""Return if the cover is closed or not."""
|
||||||
if self._config[CONF_POSITIONING_MODE] == COVER_MODE_NONE:
|
if self._config[CONF_POSITIONING_MODE] == COVER_MODE_NONE:
|
||||||
return None
|
return False
|
||||||
|
|
||||||
if self._current_cover_position == 0:
|
if self._current_cover_position == 0:
|
||||||
return True
|
return True
|
||||||
if self._current_cover_position == 100:
|
if self._current_cover_position == 100:
|
||||||
return False
|
return False
|
||||||
return None
|
return False
|
||||||
|
|
||||||
async def async_set_cover_position(self, **kwargs):
|
async def async_set_cover_position(self, **kwargs):
|
||||||
"""Move the cover to a specific position."""
|
"""Move the cover to a specific position."""
|
||||||
|
Reference in New Issue
Block a user