hass-circadian_lighting
hass-circadian_lighting copied to clipboard
feature request: HS support
I have this TuYa LED strip that works by Hue, Saturation, Brightness. Would it be possible for you to add support? I would submit a PR for it, but I wasn't able to find the correct conversion function.
More information here: https://www.zigbee2mqtt.io/devices/TYZS1L.html
supported_color_modes:
- hs
color_mode: hs
brightness: 70
hs_color:
- 120
- 50
Have you tried using the LED strip with one of the modes supported by Circadian Lighting? Even if the supported_color_modes is listed as hs you should be able to do manual service calls sending rgb_color
, hs_color
, xy_color
, etc and Home Assistant should handle the conversion to whatever "language" the light itself "speaks" - the same should be true for Circadian Lighting.
I've manually called the light_on
service with RGB and HS, which both work fine.
I've tried all the Circadian Lighting modes with no success :/
I've manually called the
light_on
service with RGB and HS, which both work fine.
Did you try with the light configured under lights_rgb
? All CL does is call the same service, so there must be something else causing it to not work. Have you tried looking at the logs, with debug logging enabled for Circadian Lighting?
Ok. The light is being controlled, but is stuck on a blueish white.
What am I looking for in the logs? I'll just grep it out into a new file.
If controlling the light is working then you should be able to just grep for circadian_lighting
finally got around to pulling the log
"2021-06-24 20":"31":46 DEBUG (MainThread)[
"homeassistant.components.websocket_api.http.connection"
][
140096649459936
]"Sending"{
"id":2,
"type":"event",
"event":{
"event_type":"state_changed",
"data":{
"entity_id":"switch.circadian_lighting_circadian_mirror",
"old_state":{
"entity_id":"switch.circadian_lighting_circadian_mirror",
"state":"off",
"attributes":{
"hs_color":null,
"brightness":null,
"friendly_name":"Circadian Mirror",
"icon":"mdi:theme-light-dark"
},
"last_changed":"2021-06-24T19:31:45.013483+00:00",
"last_updated":"2021-06-24T19:31:45.013483+00:00",
"context":{
"id":"3f7f71a23cf3c9da5f3336f3f1c8b073",
"parent_id":null,
"user_id":"f63450270eb741f4a4216df70691b313"
}
},
"new_state":{
"entity_id":"switch.circadian_lighting_circadian_mirror",
"state":"on",
"attributes":{
"hs_color":[
26.777,
47.451
],
"brightness":100,
"friendly_name":"Circadian Mirror",
"icon":"mdi:theme-light-dark"
},
"last_changed":"2021-06-24T19:31:46.499136+00:00",
"last_updated":"2021-06-24T19:31:46.499136+00:00",
"context":{
"id":"f216052270baf7351a9c585145b84ded",
"parent_id":null,
"user_id":"f63450270eb741f4a4216df70691b313"
}
}
},
"origin":"LOCAL",
"time_fired":"2021-06-24T19:31:46.499136+00:00",
"context":{
"id":"f216052270baf7351a9c585145b84ded",
"parent_id":null,
"user_id":"f63450270eb741f4a4216df70691b313"
}
}
}
There should be more logged than that, that looks like just the output of the state change that triggered CL to activate but not the actions that CL actually took. Maybe it's best to start by grepping sensor.circadian_values