Set Switchbot _attr_is_closed on init (#56611)

* self._attr_is_closed needs to be set initially.

* Set _attr_is_closed on init.
This commit is contained in:
RenierM26 2021-09-24 20:13:45 +02:00 committed by GitHub
parent 8aff51042b
commit 3c80e05100
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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: