diff --git a/switchbot_api/__init__.py b/switchbot_api/__init__.py index d41a234..c8f1d22 100644 --- a/switchbot_api/__init__.py +++ b/switchbot_api/__init__.py @@ -39,6 +39,7 @@ LockV2Commands, LockV3Commands, OthersCommands, + RGBICWWCeilingLightCommands, RGBWLightCommands, RGBWWLightCommands, RollerShadeCommands, @@ -97,6 +98,7 @@ "LockV3Commands", "OthersCommands", "PowerState", + "RGBICWWCeilingLightCommands", "RGBWLightCommands", "RGBWWLightCommands", "Remote", diff --git a/switchbot_api/commands.py b/switchbot_api/commands.py index 71e7d16..762fc59 100644 --- a/switchbot_api/commands.py +++ b/switchbot_api/commands.py @@ -257,6 +257,33 @@ def get_supported_devices(cls) -> list[str]: return ["Ceiling Light", "Ceiling Light Pro"] +class RGBICWWCeilingLightCommands(Commands): + """RGBICWW Ceiling Light commands. + + The RGBICWW Ceiling Light has two independent sub-lights: + a main light (color temperature + brightness) and a + color light (RGB + brightness). + """ + + TURN_ON_MAIN_LIGHT = "turnOnMainLight" + TURN_OFF_MAIN_LIGHT = "turnOffMainLight" + TURN_ON_COLOR_LIGHT = "turnOnColorLight" + TURN_OFF_COLOR_LIGHT = "turnOffColorLight" + # 1-100 + SET_MAIN_LIGHT_BRIGHTNESS = "setMainLightBrightness" + # 2700-6500 + SET_MAIN_LIGHT_COLOR_TEMP = "setMainLightColorTemp" + # 1-100 + SET_COLOR_LIGHT_BRIGHTNESS = "setColorLightBrightness" + # R:G:B + SET_COLOR_LIGHT_RGB = "setColorLightRGB" + + @classmethod + def get_supported_devices(cls) -> list[str]: + """Get supported devices.""" + return ["RGBICWW Ceiling Light"] + + class ArtFrameCommands(Commands): """AI Art Frame commands."""