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

API: Fix Command Status method add a new method to manage correctly the System status #118

Merged
merged 5 commits into from
Nov 14, 2018

Conversation

md-reddevil
Copy link
Contributor

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:

  • Local tests with tox run successfully PR cannot be meged unless tests pass
  • Changes tested locally to ensure platform still works as intended
  • Tests added to verify new code works

md-reddevil and others added 4 commits November 14, 2018 09:34
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.
@fronzbot fronzbot self-assigned this Nov 14, 2018
Repository owner deleted a comment from houndci-bot Nov 14, 2018
Copy link
Owner

@fronzbot fronzbot left a 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,
Copy link
Owner

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)

Copy link
Contributor Author

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.

Copy link
Owner

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.

Copy link
Contributor Author

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.

@fronzbot
Copy link
Owner

fronzbot commented Nov 14, 2018

Thanks for submitting this! 👍

@fronzbot fronzbot added this to the 0.11.0 milestone Nov 14, 2018
@fronzbot fronzbot merged commit 4241b50 into fronzbot:dev Nov 14, 2018
@fronzbot fronzbot mentioned this pull request Nov 21, 2018
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

Successfully merging this pull request may close these issues.

2 participants