diff --git a/homeassistant/components/switchbot/manifest.json b/homeassistant/components/switchbot/manifest.json index 0143855db37..21ac6ad833e 100644 --- a/homeassistant/components/switchbot/manifest.json +++ b/homeassistant/components/switchbot/manifest.json @@ -3,7 +3,7 @@ "name": "Switchbot", "documentation": "https://www.home-assistant.io/components/switchbot", "requirements": [ - "PySwitchbot==0.5" + "PySwitchbot==0.6" ], "dependencies": [], "codeowners": [ diff --git a/homeassistant/components/switchbot/switch.py b/homeassistant/components/switchbot/switch.py index b8a2a905dcb..c29dfea6737 100644 --- a/homeassistant/components/switchbot/switch.py +++ b/homeassistant/components/switchbot/switch.py @@ -46,7 +46,7 @@ class SwitchBot(SwitchDevice, RestoreEntity): state = await self.async_get_last_state() if not state: return - self._state = state.state + self._state = state.state == 'on' def turn_on(self, **kwargs) -> None: """Turn device on.""" diff --git a/requirements_all.txt b/requirements_all.txt index e53402d49a3..eb6e3cd7bee 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -64,7 +64,7 @@ PyQRCode==1.2.1 PyRMVtransport==0.1.3 # homeassistant.components.switchbot -# PySwitchbot==0.5 +# PySwitchbot==0.6 # homeassistant.components.transport_nsw PyTransportNSW==0.1.1