-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
API: Fix Command Status method add a new method to manage correctly the System status #118
Conversation
Home screen method returns just the information about last added System(network). The method "request_network_status", should replace the homescreen method in order to obtain all the information about a system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything is good to merge once the linting tests pass (it's only complaining about the indentation level so it should be pretty quick to fix).
@@ -50,7 +56,7 @@ def request_system_disarm(blink, network): | |||
|
|||
def request_command_status(blink, network, command_id): | |||
"""Request command status.""" | |||
url = "{}/network/{}/command_id/{}".format(blink.urls.base_url, | |||
url = "{}/network/{}/command/{}".format(blink.urls.base_url, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change the indentation level of network
and command_id
to get the tests to pass (they should be aligned with the first argument, like so:
url = "{}/network/{}/command/{}".format(blink.urls.base_url,
network,
command_id)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Unfortunately I'm not a python developer and can't do from scratch a module or a library, but I'm a Software Engineer so I can troubleshoot, add some methods and fix some code. I can help you with implementation of multiple networks/systems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good! I'm traveling for work this week so won't have a whole lot of time to get the multiple-systems thing integrated myself. I think the first step will end up being to migrate all the homescreen API calls to use the network status call instead. After that, my guess is it's just a matter of looking at the "onboarded networks" that are returned on login, and using that to create multiple sync modules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll work the first part, just to check where homescreen is used and to replace it with network status. Unfortunately, I don't know how to build and deploy it on my HomeAssistant for testing.
Thanks for submitting this! 👍 |
Description:
Related issue (if applicable): fixes #
#36 - It is a step to fix this issue. Changes are required in "sync_module" in order to support multiple Systems/Networks.
Checklist:
tox
run successfully PR cannot be meged unless tests pass