mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 04:37:06 +00:00
Fix mysensor cover closed state (#48833)
This commit is contained in:
parent
493bd4cdca
commit
e988062034
@ -70,12 +70,12 @@ class MySensorsCover(mysensors.device.MySensorsEntity, CoverEntity):
|
|||||||
else:
|
else:
|
||||||
amount = 100 if self._values.get(set_req.V_LIGHT) == STATE_ON else 0
|
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:
|
if v_up and not v_down and not v_stop:
|
||||||
return CoverState.OPENING
|
return CoverState.OPENING
|
||||||
if not v_up and v_down and not v_stop:
|
if not v_up and v_down and not v_stop:
|
||||||
return CoverState.CLOSING
|
return CoverState.CLOSING
|
||||||
if not v_up and not v_down and v_stop and amount == 0:
|
|
||||||
return CoverState.CLOSED
|
|
||||||
return CoverState.OPEN
|
return CoverState.OPEN
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Loading…
x
Reference in New Issue
Block a user