Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions switchbot_api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
LockV2Commands,
LockV3Commands,
OthersCommands,
RGBICWWCeilingLightCommands,
RGBWLightCommands,
RGBWWLightCommands,
RollerShadeCommands,
Expand Down Expand Up @@ -97,6 +98,7 @@
"LockV3Commands",
"OthersCommands",
"PowerState",
"RGBICWWCeilingLightCommands",
"RGBWLightCommands",
"RGBWWLightCommands",
"Remote",
Expand Down
27 changes: 27 additions & 0 deletions switchbot_api/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""

Expand Down