Fix Shelly Duo RGBW color mode attribute (#74193)

This commit is contained in:
Shay Levy
2022-06-30 02:10:25 +03:00
committed by Paulus Schoutsen
parent 7690ecc4ff
commit 9d727d2a71

View File

@@ -215,7 +215,7 @@ class BlockShellyLight(ShellyBlockEntity, LightEntity):
def color_mode(self) -> ColorMode:
"""Return the color mode of the light."""
if self.mode == "color":
if hasattr(self.block, "white"):
if self.wrapper.model in RGBW_MODELS:
return ColorMode.RGBW
return ColorMode.RGB