Skip to content

Commit

Permalink
Fix mysensor cover closed state (#48833)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinHjelmare authored and balloob committed Apr 8, 2021
1 parent cf11d9a commit f39afa6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions homeassistant/components/mysensors/cover.py
Expand Up @@ -70,12 +70,12 @@ def get_cover_state(self):
else:
amount = 100 if self._values.get(set_req.V_LIGHT) == STATE_ON else 0

if amount == 0:
return CoverState.CLOSED
if v_up and not v_down and not v_stop:
return CoverState.OPENING
if not v_up and v_down and not v_stop:
return CoverState.CLOSING
if not v_up and not v_down and v_stop and amount == 0:
return CoverState.CLOSED
return CoverState.OPEN

@property
Expand Down

0 comments on commit f39afa6

Please sign in to comment.