58 lines
2.1 KiB
Python
58 lines
2.1 KiB
Python
from ha_deconz_bridge.color import Color
|
|
from ha_deconz_bridge.lights import ChannelSpec, ControllerModeSpec, ControllerSpec, VirtualLightSpec
|
|
from ha_deconz_bridge.settings import Settings
|
|
|
|
|
|
SETTINGS = Settings.from_env()
|
|
|
|
# Replace the controller IDs with real deCONZ light IDs.
|
|
# The chromaticity and brightness numbers here are placeholders that are good
|
|
# enough for an initial hardware smoke test.
|
|
LIGHTS = {
|
|
"test_ct": VirtualLightSpec(
|
|
name="test_ct",
|
|
supported_color_modes=("color_temp",),
|
|
controllers={
|
|
"1": ControllerSpec(
|
|
zigbee_id="1",
|
|
name="Replace with real CT controller",
|
|
modes={
|
|
"color_temp": ControllerModeSpec(
|
|
name="color_temp",
|
|
channels={
|
|
"ww": ChannelSpec(
|
|
"ww",
|
|
Color.from_color_temp(500, brightness=300, temp_range=(153, 500)),
|
|
),
|
|
"cw": ChannelSpec(
|
|
"cw",
|
|
Color.from_color_temp(153, brightness=320, temp_range=(153, 500)),
|
|
),
|
|
},
|
|
)
|
|
},
|
|
)
|
|
},
|
|
),
|
|
"test_rgb": VirtualLightSpec(
|
|
name="test_rgb",
|
|
supported_color_modes=("rgb",),
|
|
controllers={
|
|
"2": ControllerSpec(
|
|
zigbee_id="2",
|
|
name="Replace with real RGB controller",
|
|
modes={
|
|
"rgb": ControllerModeSpec(
|
|
name="rgb",
|
|
channels={
|
|
"r": ChannelSpec("r", Color.from_xy((0.68, 0.31), brightness=180)),
|
|
"g": ChannelSpec("g", Color.from_xy((0.18, 0.70), brightness=420)),
|
|
"b": ChannelSpec("b", Color.from_xy((0.14, 0.05), brightness=110)),
|
|
},
|
|
)
|
|
},
|
|
)
|
|
},
|
|
),
|
|
}
|