diff --git a/pywizlight/bulb.py b/pywizlight/bulb.py index 14aa855..79d88e4 100755 --- a/pywizlight/bulb.py +++ b/pywizlight/bulb.py @@ -170,7 +170,8 @@ def get_rgb(self): def get_brightness(self) -> int: """Get the value of the brightness 0-255.""" - return self.percent_to_hex(self.pilotResult["dimming"]) + if 'dimming' in self.pilotResult: + return self.percent_to_hex(self.pilotResult['dimming']) def get_colortemp(self) -> int: """Get the color temperatur from the bulb."""