this post was submitted on 27 Jun 2023
0 points (NaN% liked)

homeassistant

12019 readers
71 users here now

Home Assistant is open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server. Available for free at home-assistant.io

founded 1 year ago
MODERATORS
 

Hey guys,
Yesterday I have finished installing two LED strips to my kitchen. Both strips are CCT, connected to separate outputs on 5 channel dimLED zigbee dimmer. The dimmer can work in single colour, CCT, rgb, rgbw and rgbww modes.
If I set it to CCT mode, it shows up in HA as single light and both strips are controlled in tandem. instead of replacing it with two 2ch dimmers, my idea is to switch it to rgbw mode and somehow convince HA to see them as two CCT lights.
Honestly though, I am confused with how empty my config file is. There aren't any of my zigbee divices. (I guess i was experimenting with HA long time ago and mostly with ESP devices).
Has anyone tried something like this? I am using a Sonoff zigbee USB stick and ZHA integration.
Cheers

top 2 comments
sorted by: hot top controversial new old
[–] Bluesheep@lemmy.world 1 points 1 year ago (1 children)

I’m currently in the middle of a renovation so my HA instance is down, but let me give you some pointers. I think it’s possible but it’s getting right into the guts of what makes HA powerful (and complicated)

Firstly, template lights this is how you can surface a light that reads values from other elements and presents them as light settings.

Then the attribute you want is rgb_color and you want to parse out the red value (for the red channel) and convert it to a brightness for the template lamp.

Lastly you’ll need to work how to update the red value of the led strip when the brightness of the light changes. This will involve pulling back the green and blue values of the led strip and updating the strip’s rgb_color with the combined list. this page has examples.

I’m sorry I can’t give you any sample code but this hopefully gets you started.

[–] Daaric@lemmy.world 1 points 1 year ago

Thanks for pointing me somewhere. I have managed to control individual channels and mix them with rgb_color, one strip was working quite fine on its own, on the other hand the second one cased troubles. It used the white channel, and whenever the white channel got active, the rest got shut down.
Eventually I have decided it's not worth any more of my time and replaced it with individual 2ch dimmers. I will save my 5ch for somewhere I can actually utilize it, or to tinker with the settings in the future.