diff --git a/custom_components/comelit/light.py b/custom_components/comelit/light.py index 0ff8098..edab4e4 100644 --- a/custom_components/comelit/light.py +++ b/custom_components/comelit/light.py @@ -32,11 +32,11 @@ def is_on(self): @property def supported_color_modes(self): - return {ColorMode.BRIGHTNESS} if self._brightness else {ColorMode.ONOFF} + return {ColorMode.BRIGHTNESS} if self._brightness is not None else {ColorMode.ONOFF} @property def color_mode(self): - return {ColorMode.BRIGHTNESS} if self._brightness else {ColorMode.ONOFF} + return ColorMode.BRIGHTNESS if self._brightness is not None else ColorMode.ONOFF @property def brightness(self):