From ac256815f9fb4224f5b5a3bce224dc70002436e8 Mon Sep 17 00:00:00 2001 From: Markus Bong <2Fake1987@gmail.com> Date: Thu, 8 Oct 2020 16:55:23 +0200 Subject: [PATCH] Optimize devolo light devices (#41053) --- homeassistant/components/devolo_home_control/light.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/devolo_home_control/light.py b/homeassistant/components/devolo_home_control/light.py index c2f678425be..9c532be2dc2 100644 --- a/homeassistant/components/devolo_home_control/light.py +++ b/homeassistant/components/devolo_home_control/light.py @@ -77,4 +77,7 @@ class DevoloLightDeviceEntity(DevoloMultiLevelSwitchDeviceEntity, LightEntity): def turn_off(self, **kwargs) -> None: """Turn device off.""" - self._multi_level_switch_property.set(0) + if self._binary_switch_property is not None: + self._binary_switch_property.set(False) + else: + self._multi_level_switch_property.set(0)