Optimize devolo light devices (#41053)

This commit is contained in:
Markus Bong 2020-10-08 16:55:23 +02:00 committed by GitHub
parent a81f4cf387
commit ac256815f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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