diff --git a/homeassistant/components/shelly/const.py b/homeassistant/components/shelly/const.py index 3c9c24b1f7f..a6f3ab12c6b 100644 --- a/homeassistant/components/shelly/const.py +++ b/homeassistant/components/shelly/const.py @@ -21,6 +21,11 @@ LIGHT_TRANSITION_MIN_FIRMWARE_DATE: Final = 20210226 # max light transition time in milliseconds MAX_TRANSITION_TIME: Final = 5000 +RGBW_MODELS: Final = ( + "SHBLB-1", + "SHRGBW2", +) + MODELS_SUPPORTING_LIGHT_TRANSITION: Final = ( "SHBDUO-1", "SHCB-1", diff --git a/homeassistant/components/shelly/light.py b/homeassistant/components/shelly/light.py index cd034c1e7e5..3e0fce43681 100644 --- a/homeassistant/components/shelly/light.py +++ b/homeassistant/components/shelly/light.py @@ -46,6 +46,7 @@ from .const import ( LIGHT_TRANSITION_MIN_FIRMWARE_DATE, MAX_TRANSITION_TIME, MODELS_SUPPORTING_LIGHT_TRANSITION, + RGBW_MODELS, RPC, SHBLB_1_RGB_EFFECTS, STANDARD_RGB_EFFECTS, @@ -143,7 +144,7 @@ class BlockShellyLight(ShellyBlockEntity, LightEntity): if hasattr(block, "red") and hasattr(block, "green") and hasattr(block, "blue"): self._min_kelvin = KELVIN_MIN_VALUE_COLOR - if hasattr(block, "white"): + if wrapper.model in RGBW_MODELS: self._supported_color_modes.add(COLOR_MODE_RGBW) else: self._supported_color_modes.add(COLOR_MODE_RGB)