From 3c80e051001de30a2f00f81b6884889ce295bdd5 Mon Sep 17 00:00:00 2001 From: RenierM26 <66512715+RenierM26@users.noreply.github.com> Date: Fri, 24 Sep 2021 20:13:45 +0200 Subject: [PATCH] Set Switchbot _attr_is_closed on init (#56611) * self._attr_is_closed needs to be set initially. * Set _attr_is_closed on init. --- homeassistant/components/switchbot/cover.py | 1 + 1 file changed, 1 insertion(+) diff --git a/homeassistant/components/switchbot/cover.py b/homeassistant/components/switchbot/cover.py index e28049eeb95..5582b8b4ed6 100644 --- a/homeassistant/components/switchbot/cover.py +++ b/homeassistant/components/switchbot/cover.py @@ -77,6 +77,7 @@ class SwitchBotCurtainEntity(SwitchbotEntity, CoverEntity, RestoreEntity): """Initialize the Switchbot.""" super().__init__(coordinator, idx, mac, name) self._attr_unique_id = idx + self._attr_is_closed = None self._device = device async def async_added_to_hass(self) -> None: