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

[feat] Add support for Light Groups #231

Merged
merged 7 commits into from
Jan 18, 2021
Merged

[feat] Add support for Light Groups #231

merged 7 commits into from
Jan 18, 2021

Conversation

decompil3d
Copy link
Collaborator

@decompil3d decompil3d commented Dec 29, 2020

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

  • Still need to write tests

@coveralls
Copy link

Coverage Status

Coverage increased (+4.2%) to 64.06% when pulling 02d1513 on decompil3d:beam into 63de4be on tchellomello:master.

@coveralls
Copy link

coveralls commented Dec 29, 2020

Coverage Status

Coverage increased (+4.2%) to 64.06% when pulling ae96f6a on decompil3d:beam into e95b84d on tchellomello:master.

@decompil3d decompil3d marked this pull request as ready for review December 29, 2020 21:18
@decompil3d
Copy link
Collaborator Author

Looks like the linter failure is broken in master as well.

@decompil3d
Copy link
Collaborator Author

@tchellomello This is ready for your review

@decompil3d
Copy link
Collaborator Author

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!

@tchellomello tchellomello merged commit 9488d57 into tchellomello:master Jan 18, 2021
@tchellomello
Copy link
Owner

Thanks again @decompil3d !! You rock!

@decompil3d decompil3d deleted the beam branch January 18, 2021 04:29
@decompil3d
Copy link
Collaborator Author

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.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants