Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for virtual Hue Labs switches #182

Open
danielschenk opened this issue Feb 19, 2023 · 4 comments
Open

Support for virtual Hue Labs switches #182

danielschenk opened this issue Feb 19, 2023 · 4 comments

Comments

@danielschenk
Copy link

danielschenk commented Feb 19, 2023

Hue Labs are a collection of experimental scenes, automations and rules which can be installed onto the bridge via the Hue Labs portal. This article shows an undocumented method to toggle these formulas (eg. dynamic scenes) via the API.

I now use a RESTful command in HA to toggle my labs formulas. This is cumbersome because it has no relation to the Hue integration at all, and I needed to get a separate API key from my bridge and put it into my secrets. Moreover, I need to fetch the resource links from my bridge with some other tool to find out the IDs I want to control.

Even though this resource links API method is undocumented, would it be a nice idea to add support for this in the library? I don't know if these resource links are subscribeable (like the usual objects) so I can imagine that keeping the Home Assistant DB in sync with these could be a pain. If aiohue can provide APIs to at least fetch them and set their state, then HA could maybe just periodically fetch them and provide them as controllable entities. Another option could be to put a button somewhere in the UI to trigger a fetch (and warn the user that this is an experimental feature, due to the API which could break at any time).

@marcelveldt
Copy link
Collaborator

The linked article mentions a method on the old/deprecated v1 api. Nowadays everything has moved to the v2 api.
This is available in aiohue as script instances.

At some point it might be of interest to translate some/all of the available scripts as button entities or something like that.

@danielschenk
Copy link
Author

Do I understand correctly, that it's possible to set labs formula states with aiohue, but it's not exposed in HA yet? Should I raise a ticket at HA itself for this?

@marcelveldt
Copy link
Collaborator

Well, you could raise a ticket but this is not a bug but a feature request ;-)
So let's wait for someone to pick up the glove and implement it, all building blocks are already prepared.

If there is a lot of interest I might pick it up at some point just not now as I'm really busy with other things.

@danielschenk
Copy link
Author

I'm experienced in Python but not familiar with the code base. Also I have done little with async up until now. It could be a nice opportunity to get more familiar with it, but have some other priorities as well.

If I feel like I could give it a try and have the time for it I'll let you know. Please let me know if you start with it instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants