From 0028dc46e652634fd28c53a584a75a11b4cb434e Mon Sep 17 00:00:00 2001
From: Shay Levy <levyshay1@gmail.com>
Date: Thu, 30 Jun 2022 02:10:25 +0300
Subject: [PATCH] Fix Shelly Duo RGBW color mode attribute (#74193)

---
 homeassistant/components/shelly/light.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/homeassistant/components/shelly/light.py b/homeassistant/components/shelly/light.py
index 79db9c509f4..b75e1ad2377 100644
--- a/homeassistant/components/shelly/light.py
+++ b/homeassistant/components/shelly/light.py
@@ -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
 
-- 
GitLab