Add yeelight class to fix superclass issue (#97649)

* Add device naming to Yeelight

* Add extra light entity to fix superclass

* Add extra light entity to fix superclass
This commit is contained in:
Joost Lekkerkerker 2023-08-05 22:36:45 +02:00 committed by GitHub
parent 74d02a1574
commit c7b7ca8769
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -297,7 +297,7 @@ async def async_setup_entry(
_lights_setup_helper(YeelightColorLightWithNightlightSwitch)
_lights_setup_helper(YeelightNightLightModeWithoutBrightnessControl)
else:
_lights_setup_helper(YeelightColorLightWithoutNightlightSwitch)
_lights_setup_helper(YeelightColorLightWithoutNightlightSwitchLight)
elif device_type == BulbType.WhiteTemp:
if nl_switch_light and device.is_nightlight_supported:
_lights_setup_helper(YeelightWithNightLight)
@ -931,6 +931,14 @@ class YeelightColorLightWithoutNightlightSwitch(
"""Representation of a Color Yeelight light."""
class YeelightColorLightWithoutNightlightSwitchLight(
YeelightColorLightWithoutNightlightSwitch
):
"""Representation of a Color Yeelight light."""
_attr_name = None
class YeelightColorLightWithNightlightSwitch(
YeelightNightLightSupport, YeelightColorLightSupport, YeelightGenericLight
):