From ebcd65d6cec451a6cbd20bb32b94bbd0e4dc9f37 Mon Sep 17 00:00:00 2001 From: Charles Garwood Date: Tue, 14 Jul 2020 19:50:21 -0400 Subject: [PATCH] Fix setting screen brightness (#10) --- custom_components/fullykiosk/light.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/fullykiosk/light.py b/custom_components/fullykiosk/light.py index 856dc38..695b579 100644 --- a/custom_components/fullykiosk/light.py +++ b/custom_components/fullykiosk/light.py @@ -61,9 +61,9 @@ def unique_id(self): def turn_on(self, **kwargs): self.controller.screenOn() brightness = kwargs.get(ATTR_BRIGHTNESS) - if brightness == None: + if brightness is None: return - if brightness != self._brightness: + if brightness != self.coordinator.data["screenBrightness"]: self.controller.setScreenBrightness(brightness) def turn_off(self, **kwargs):