-
Notifications
You must be signed in to change notification settings - Fork 171
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
[feat] Add support for Light Groups #231
Conversation
Looks like the linter failure is broken in |
@tchellomello This is ready for your review |
Hey @tchellomello -- just wanted to ping to see if you can take a look at this PR and merge if you're alright with it. Let me know if you have any concerns. Thanks! |
Thanks again @decompil3d !! You rock! |
Awesome! Thanks for merging. Mind publishing a release? I'm planning to make a PR against Home Assistant to apply this new light group support. |
My original goal here was to support the Ring Beams line of products (e.g. lighting transformers), but it seems like their API for that product line is vastly different than the other products, likely because it was from an acquisition. The new API is all web sockets based. And I'm no Python expert, so I'm not able to really dig in to add support for that.
But, it looks like their REST API does provide support for toggling Light Groups. And when you add a new Transformer device to your account, they prompt you to add it into a group. So this is my simpler approach to add support for this product -- just exposing a method to retrieve Light Groups and toggle their light status.
I've confirmed with my own device that this code works as expected. And it is all additive, so it won't cause any API breaks or sudden additional devices for existing consumers of this library.
Like I said, I am definitely not a Python expert. I primarily write JS. So please feel free to tell me where I'm not doing things right or not in the Python way. Happy to adjust as needed.
TODO