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

Asynchrone or batch requests #41

Open
mjal opened this issue Nov 2, 2022 · 0 comments
Open

Asynchrone or batch requests #41

mjal opened this issue Nov 2, 2022 · 0 comments

Comments

@mjal
Copy link
Contributor

mjal commented Nov 2, 2022

I would be able to send multiple commands instantly. ATM I have to wait each command to finish before sending another.
I now that I can create groups to do this but it's not as flexible.

For exemple phue allow to send a command to a list of lamps or a list of groups, when specifiying an array for the id of the lightbulb or group.

# Turn lamp 2 on
b.set_light(2,'on', True)
# You can also control multiple lamps by sending a list as lamp_id
b.set_light( [1,2], 'on', True)

I use qhue because of the excellent support for remote connection, and I was wondering how to do the same.
But base on qhue internal, I'm not sure how to achieve this.

I think it could either be:

  • Allowing to send a batch of command, or
  • Returning a promise when sent with async=True

I think that requests-futures could be the good tool for this.

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

1 participant