From e988062034935eac7cad36c75e2e72cab3af25aa Mon Sep 17 00:00:00 2001 From: Martin Hjelmare Date: Thu, 8 Apr 2021 21:39:03 +0200 Subject: [PATCH] Fix mysensor cover closed state (#48833) --- homeassistant/components/mysensors/cover.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/mysensors/cover.py b/homeassistant/components/mysensors/cover.py index 0e3478a57bf..33393f08def 100644 --- a/homeassistant/components/mysensors/cover.py +++ b/homeassistant/components/mysensors/cover.py @@ -70,12 +70,12 @@ class MySensorsCover(mysensors.device.MySensorsEntity, CoverEntity): 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