diff --git a/custom_components/sonoff/light.py b/custom_components/sonoff/light.py index 64cc825a..4cb231cb 100644 --- a/custom_components/sonoff/light.py +++ b/custom_components/sonoff/light.py @@ -1041,7 +1041,7 @@ async def async_turn_off(self, **kwargs) -> None: # noinspection PyAbstractClass, UIID22 -class XFanLight(XEntity, LightEntity): +class XFanLight(XOnOffLight): params = {"switches", "light"} uid = "1" # backward compatibility @@ -1070,7 +1070,7 @@ async def async_turn_off(self): # noinspection PyAbstractClass, UIID25 -class XDiffuserLight(XEntity, LightEntity): +class XDiffuserLight(XOnOffLight): params = {"lightswitch", "lightbright", "lightmode", "lightRcolor"} _attr_effect_list = ["Color Light", "RGB Color", "Night Light"] @@ -1137,7 +1137,7 @@ async def async_turn_off(self, **kwargs) -> None: await self.ewelink.send(self.device, {"lightswitch": 0}) -class XT5Light(XEntity, LightEntity): +class XT5Light(XOnOffLight): params = {"lightSwitch", "lightMode"} _attr_effect_list = [