From d304b49d53f656ccadb531776c502c4978c8752a Mon Sep 17 00:00:00 2001 From: Bas Nijholt Date: Wed, 30 Sep 2020 10:05:36 +0200 Subject: [PATCH] fix setting state before turn_on --- custom_components/adaptive_lighting/switch.py | 1 - 1 file changed, 1 deletion(-) diff --git a/custom_components/adaptive_lighting/switch.py b/custom_components/adaptive_lighting/switch.py index 1cc5da93..e76a92e8 100755 --- a/custom_components/adaptive_lighting/switch.py +++ b/custom_components/adaptive_lighting/switch.py @@ -291,7 +291,6 @@ class AdaptiveSwitch(SwitchEntity, RestoreEntity): ) last_state = await self.async_get_last_state() if last_state and last_state.state == STATE_ON: - self._state = True await self.async_turn_on(adapt_lights=not self._only_once) else: self._state = False