koying / openrgb_ha

OpenRGB integration for Home Assistant
110 stars 18 forks source link

Configure setup to get more detailled entities #3

Closed HydrelioxGitHub closed 3 years ago

HydrelioxGitHub commented 3 years ago

Is is technically doable to get one entity in HA for each led or zone of the same device ? I don't know if the sdk could do that ...

koying commented 3 years ago

I haven't even had a deep look at the OrpenRGB SDK, to be honest. So far, it's the original PR + fixes for connection issue.

FeikoJoosten commented 3 years ago

Based on the example provided in the readme of the python sdk. It should be relatively straightforward to retrieve a devices and setup entities for each of its zones/leds. Unfortunately I don't have enough experience creating custom integrations to do this myself, without needing a lot of time haha.

FeikoJoosten commented 3 years ago

To come back to this. On my fork of this repro I have this all working. Still working out some issues. As I'm currently not properly generating unique ids for entities. And I want to see if I can extend zones as well as leds (and make the individual leds disabled by default). Anyway, I'm making progress, however I'm new to this, so I'm not really sure if what I'm doing is the correct approach. 😅

HydrelioxGitHub commented 3 years ago

There already is an issue on the unique ID generation. If the owner agree, you could push a PR for this feature ?

FeikoJoosten commented 3 years ago

Hmm yes I see. I probably have some time this evening to add support for zones. Once I have that working the way I intend to I'll setup a PR.

FeikoJoosten commented 3 years ago

@HydrelioxGitHub there you go. https://github.com/koying/openrgb_ha/pull/8

I've left out support for zones as I realized individual LED controls is more than fine for my personal case. And I didn't want to add in too much overhead.