{"action":"created","comment":{"url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/comments/145769474","pull_request_review_id":70619500,"id":145769474,"diff_hunk":"@@ -85,23 +85,30 @@ def __init__(self, hass, russ, sources, zone_id, extra):\n \n     def update(self):\n         \"\"\"Retrieve latest state.\"\"\"\n-        if self._russ.get_power('1', self._zone_id) == 0:\n-            self._state = STATE_OFF\n-        else:\n-            self._state = STATE_ON\n-\n-        self._volume = self._russ.get_volume('1', self._zone_id) / 100.0\n-\n+        # Updated this function to make a single call to get_zone_info, so that\n+        # with a single call we can get On/Off, Volume and Source, reducing the\n+        # amount of traffic and speeding up the update process.\n+        ret = self._russ.get_zone_info('1', self._zone_id, 4)\n+        _LOGGER.debug(\"ret= %s\", ret)\n+        if ret is not None:","path":"homeassistant/components/media_player/russound_rnet.py","position":25,"original_position":25,"commit_id":"64519f72b1aaae198b86eb3fb63e91937eee133f","original_commit_id":"64519f72b1aaae198b86eb3fb63e91937eee133f","user":{"login":"armills","id":1386547,"avatar_url":"https://avatars2.githubusercontent.com/u/1386547?v=4","gravatar_id":"","url":"https://api.github.com/users/armills","html_url":"https://github.com/armills","followers_url":"https://api.github.com/users/armills/followers","following_url":"https://api.github.com/users/armills/following{/other_user}","gists_url":"https://api.github.com/users/armills/gists{/gist_id}","starred_url":"https://api.github.com/users/armills/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/armills/subscriptions","organizations_url":"https://api.github.com/users/armills/orgs","repos_url":"https://api.github.com/users/armills/repos","events_url":"https://api.github.com/users/armills/events{/privacy}","received_events_url":"https://api.github.com/users/armills/received_events","type":"User","site_admin":false},"body":"**Preference:**\r\nOur preferred style is the pattern shown below. This saves us from having to indent the rest of the function. This will also line up the indentation of the comments below with the code.\r\n```python\r\nif ret is None:\r\n    _LOGGER.error(\"Could not update status for zone %s\", self._zone_id)\r\n    return\r\n\r\n_LOGGER.debug(\"Updating status for zone %s\", self._zone_id)\r\n…\r\n```","created_at":"2017-10-19T17:31:28Z","updated_at":"2017-10-19T17:32:03Z","html_url":"https://github.com/home-assistant/home-assistant/pull/9739#discussion_r145769474","pull_request_url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/9739","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/home-assistant/home-assistant/pulls/comments/145769474"},"html":{"href":"https://github.com/home-assistant/home-assistant/pull/9739#discussion_r145769474"},"pull_request":{"href":"https://api.github.com/repos/home-assistant/home-assistant/pulls/9739"}}},"pull_request":{"url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/9739","id":145312248,"html_url":"https://github.com/home-assistant/home-assistant/pull/9739","diff_url":"https://github.com/home-assistant/home-assistant/pull/9739.diff","patch_url":"https://github.com/home-assistant/home-assistant/pull/9739.patch","issue_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/9739","number":9739,"state":"open","locked":false,"title":"Update the Russound RNET component to use enhanced Russound.py ","user":{"login":"altersis","id":32140109,"avatar_url":"https://avatars2.githubusercontent.com/u/32140109?v=4","gravatar_id":"","url":"https://api.github.com/users/altersis","html_url":"https://github.com/altersis","followers_url":"https://api.github.com/users/altersis/followers","following_url":"https://api.github.com/users/altersis/following{/other_user}","gists_url":"https://api.github.com/users/altersis/gists{/gist_id}","starred_url":"https://api.github.com/users/altersis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/altersis/subscriptions","organizations_url":"https://api.github.com/users/altersis/orgs","repos_url":"https://api.github.com/users/altersis/repos","events_url":"https://api.github.com/users/altersis/events{/privacy}","received_events_url":"https://api.github.com/users/altersis/received_events","type":"User","site_admin":false},"body":"## Description:\r\n\r\n\r\n**Related issue (if applicable):** fixes #9604 \r\n\r\nRelated to issue #6 in the [russound rnet ](https://github.com/laf/russound)component. \r\n\r\n**Pull request in [home-assistant.github.io](https://github.com/home-assistant/home-assistant.github.io) with documentation (if applicable):** home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>\r\n**No documentation change is necessary**\r\n## Example entry for `configuration.yaml` (if applicable): No configuration.yaml changes are necessary\r\n\r\n## Checklist:\r\n\r\nIf user exposed functionality or configuration variables are added/changed:\r\n  - [ ] Documentation added/updated in [home-assistant.github.io](https://github.com/home-assistant/home-assistant.github.io) -- **No new functionality added, only existing functionality has been corrected**\r\n\r\nIf the code communicates with devices, web services, or third-party tools:\r\n  - [X] Local tests with `tox` run successfully. **Your PR cannot be merged unless tests pass**\r\n  - [X] New dependencies have been added to the `REQUIREMENTS` variable ([example][ex-requir]).\r\n  - [ ] New dependencies are only imported inside functions that use them ([example][ex-import]). No new dependencies added.\r\n  - [ ] New dependencies have been added to `requirements_all.txt` by running `script/gen_requirements_all.py`. No new dependencies added.\r\n  - [ ] New files were added to `.coveragerc`. No new files added. \r\n\r\nIf the code does not interact with devices: N/A\r\n  - [ ] Local tests with `tox` run successfully. **Your PR cannot be merged unless tests pass**\r\n  - [ ] Tests have been added to verify that the new code works.\r\n\r\n\r\n[ex-requir]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard.py#L14\r\n[ex-import]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard.py#L54\r\n","created_at":"2017-10-07T22:48:55Z","updated_at":"2017-10-19T17:32:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4efbce24748f6076398de1ee655ff23414e66d25","assignee":null,"assignees":[],"requested_reviewers":[{"login":"andrey-git","id":5478779,"avatar_url":"https://avatars0.githubusercontent.com/u/5478779?v=4","gravatar_id":"","url":"https://api.github.com/users/andrey-git","html_url":"https://github.com/andrey-git","followers_url":"https://api.github.com/users/andrey-git/followers","following_url":"https://api.github.com/users/andrey-git/following{/other_user}","gists_url":"https://api.github.com/users/andrey-git/gists{/gist_id}","starred_url":"https://api.github.com/users/andrey-git/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrey-git/subscriptions","organizations_url":"https://api.github.com/users/andrey-git/orgs","repos_url":"https://api.github.com/users/andrey-git/repos","events_url":"https://api.github.com/users/andrey-git/events{/privacy}","received_events_url":"https://api.github.com/users/andrey-git/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/9739/commits","review_comments_url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/9739/comments","review_comment_url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/comments{/number}","comments_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/9739/comments","statuses_url":"https://api.github.com/repos/home-assistant/home-assistant/statuses/64519f72b1aaae198b86eb3fb63e91937eee133f","head":{"label":"altersis:dev","ref":"dev","sha":"64519f72b1aaae198b86eb3fb63e91937eee133f","user":{"login":"altersis","id":32140109,"avatar_url":"https://avatars2.githubusercontent.com/u/32140109?v=4","gravatar_id":"","url":"https://api.github.com/users/altersis","html_url":"https://github.com/altersis","followers_url":"https://api.github.com/users/altersis/followers","following_url":"https://api.github.com/users/altersis/following{/other_user}","gists_url":"https://api.github.com/users/altersis/gists{/gist_id}","starred_url":"https://api.github.com/users/altersis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/altersis/subscriptions","organizations_url":"https://api.github.com/users/altersis/orgs","repos_url":"https://api.github.com/users/altersis/repos","events_url":"https://api.github.com/users/altersis/events{/privacy}","received_events_url":"https://api.github.com/users/altersis/received_events","type":"User","site_admin":false},"repo":{"id":105064142,"name":"home-assistant","full_name":"altersis/home-assistant","owner":{"login":"altersis","id":32140109,"avatar_url":"https://avatars2.githubusercontent.com/u/32140109?v=4","gravatar_id":"","url":"https://api.github.com/users/altersis","html_url":"https://github.com/altersis","followers_url":"https://api.github.com/users/altersis/followers","following_url":"https://api.github.com/users/altersis/following{/other_user}","gists_url":"https://api.github.com/users/altersis/gists{/gist_id}","starred_url":"https://api.github.com/users/altersis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/altersis/subscriptions","organizations_url":"https://api.github.com/users/altersis/orgs","repos_url":"https://api.github.com/users/altersis/repos","events_url":"https://api.github.com/users/altersis/events{/privacy}","received_events_url":"https://api.github.com/users/altersis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/altersis/home-assistant","description":":house_with_garden: Open-source home automation platform running on Python 3","fork":true,"url":"https://api.github.com/repos/altersis/home-assistant","forks_url":"https://api.github.com/repos/altersis/home-assistant/forks","keys_url":"https://api.github.com/repos/altersis/home-assistant/keys{/key_id}","collaborators_url":"https://api.github.com/repos/altersis/home-assistant/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/altersis/home-assistant/teams","hooks_url":"https://api.github.com/repos/altersis/home-assistant/hooks","issue_events_url":"https://api.github.com/repos/altersis/home-assistant/issues/events{/number}","events_url":"https://api.github.com/repos/altersis/home-assistant/events","assignees_url":"https://api.github.com/repos/altersis/home-assistant/assignees{/user}","branches_url":"https://api.github.com/repos/altersis/home-assistant/branches{/branch}","tags_url":"https://api.github.com/repos/altersis/home-assistant/tags","blobs_url":"https://api.github.com/repos/altersis/home-assistant/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/altersis/home-assistant/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/altersis/home-assistant/git/refs{/sha}","trees_url":"https://api.github.com/repos/altersis/home-assistant/git/trees{/sha}","statuses_url":"https://api.github.com/repos/altersis/home-assistant/statuses/{sha}","languages_url":"https://api.github.com/repos/altersis/home-assistant/languages","stargazers_url":"https://api.github.com/repos/altersis/home-assistant/stargazers","contributors_url":"https://api.github.com/repos/altersis/home-assistant/contributors","subscribers_url":"https://api.github.com/repos/altersis/home-assistant/subscribers","subscription_url":"https://api.github.com/repos/altersis/home-assistant/subscription","commits_url":"https://api.github.com/repos/altersis/home-assistant/commits{/sha}","git_commits_url":"https://api.github.com/repos/altersis/home-assistant/git/commits{/sha}","comments_url":"https://api.github.com/repos/altersis/home-assistant/comments{/number}","issue_comment_url":"https://api.github.com/repos/altersis/home-assistant/issues/comments{/number}","contents_url":"https://api.github.com/repos/altersis/home-assistant/contents/{+path}","compare_url":"https://api.github.com/repos/altersis/home-assistant/compare/{base}...{head}","merges_url":"https://api.github.com/repos/altersis/home-assistant/merges","archive_url":"https://api.github.com/repos/altersis/home-assistant/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/altersis/home-assistant/downloads","issues_url":"https://api.github.com/repos/altersis/home-assistant/issues{/number}","pulls_url":"https://api.github.com/repos/altersis/home-assistant/pulls{/number}","milestones_url":"https://api.github.com/repos/altersis/home-assistant/milestones{/number}","notifications_url":"https://api.github.com/repos/altersis/home-assistant/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/altersis/home-assistant/labels{/name}","releases_url":"https://api.github.com/repos/altersis/home-assistant/releases{/id}","deployments_url":"https://api.github.com/repos/altersis/home-assistant/deployments","created_at":"2017-09-27T20:07:56Z","updated_at":"2017-09-27T20:08:05Z","pushed_at":"2017-10-19T16:05:28Z","git_url":"git://github.com/altersis/home-assistant.git","ssh_url":"git@github.com:altersis/home-assistant.git","clone_url":"https://github.com/altersis/home-assistant.git","svn_url":"https://github.com/altersis/home-assistant","homepage":"https://home-assistant.io","size":73703,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"home-assistant:dev","ref":"dev","sha":"8132989f91b4b81ee839954a41ed653868f38cff","user":{"login":"home-assistant","id":13844975,"avatar_url":"https://avatars3.githubusercontent.com/u/13844975?v=4","gravatar_id":"","url":"https://api.github.com/users/home-assistant","html_url":"https://github.com/home-assistant","followers_url":"https://api.github.com/users/home-assistant/followers","following_url":"https://api.github.com/users/home-assistant/following{/other_user}","gists_url":"https://api.github.com/users/home-assistant/gists{/gist_id}","starred_url":"https://api.github.com/users/home-assistant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/home-assistant/subscriptions","organizations_url":"https://api.github.com/users/home-assistant/orgs","repos_url":"https://api.github.com/users/home-assistant/repos","events_url":"https://api.github.com/users/home-assistant/events{/privacy}","received_events_url":"https://api.github.com/users/home-assistant/received_events","type":"Organization","site_admin":false},"repo":{"id":12888993,"name":"home-assistant","full_name":"home-assistant/home-assistant","owner":{"login":"home-assistant","id":13844975,"avatar_url":"https://avatars3.githubusercontent.com/u/13844975?v=4","gravatar_id":"","url":"https://api.github.com/users/home-assistant","html_url":"https://github.com/home-assistant","followers_url":"https://api.github.com/users/home-assistant/followers","following_url":"https://api.github.com/users/home-assistant/following{/other_user}","gists_url":"https://api.github.com/users/home-assistant/gists{/gist_id}","starred_url":"https://api.github.com/users/home-assistant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/home-assistant/subscriptions","organizations_url":"https://api.github.com/users/home-assistant/orgs","repos_url":"https://api.github.com/users/home-assistant/repos","events_url":"https://api.github.com/users/home-assistant/events{/privacy}","received_events_url":"https://api.github.com/users/home-assistant/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/home-assistant/home-assistant","description":":house_with_garden: Open-source home automation platform running on Python 3","fork":false,"url":"https://api.github.com/repos/home-assistant/home-assistant","forks_url":"https://api.github.com/repos/home-assistant/home-assistant/forks","keys_url":"https://api.github.com/repos/home-assistant/home-assistant/keys{/key_id}","collaborators_url":"https://api.github.com/repos/home-assistant/home-assistant/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/home-assistant/home-assistant/teams","hooks_url":"https://api.github.com/repos/home-assistant/home-assistant/hooks","issue_events_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/events{/number}","events_url":"https://api.github.com/repos/home-assistant/home-assistant/events","assignees_url":"https://api.github.com/repos/home-assistant/home-assistant/assignees{/user}","branches_url":"https://api.github.com/repos/home-assistant/home-assistant/branches{/branch}","tags_url":"https://api.github.com/repos/home-assistant/home-assistant/tags","blobs_url":"https://api.github.com/repos/home-assistant/home-assistant/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/home-assistant/home-assistant/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/home-assistant/home-assistant/git/refs{/sha}","trees_url":"https://api.github.com/repos/home-assistant/home-assistant/git/trees{/sha}","statuses_url":"https://api.github.com/repos/home-assistant/home-assistant/statuses/{sha}","languages_url":"https://api.github.com/repos/home-assistant/home-assistant/languages","stargazers_url":"https://api.github.com/repos/home-assistant/home-assistant/stargazers","contributors_url":"https://api.github.com/repos/home-assistant/home-assistant/contributors","subscribers_url":"https://api.github.com/repos/home-assistant/home-assistant/subscribers","subscription_url":"https://api.github.com/repos/home-assistant/home-assistant/subscription","commits_url":"https://api.github.com/repos/home-assistant/home-assistant/commits{/sha}","git_commits_url":"https://api.github.com/repos/home-assistant/home-assistant/git/commits{/sha}","comments_url":"https://api.github.com/repos/home-assistant/home-assistant/comments{/number}","issue_comment_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/comments{/number}","contents_url":"https://api.github.com/repos/home-assistant/home-assistant/contents/{+path}","compare_url":"https://api.github.com/repos/home-assistant/home-assistant/compare/{base}...{head}","merges_url":"https://api.github.com/repos/home-assistant/home-assistant/merges","archive_url":"https://api.github.com/repos/home-assistant/home-assistant/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/home-assistant/home-assistant/downloads","issues_url":"https://api.github.com/repos/home-assistant/home-assistant/issues{/number}","pulls_url":"https://api.github.com/repos/home-assistant/home-assistant/pulls{/number}","milestones_url":"https://api.github.com/repos/home-assistant/home-assistant/milestones{/number}","notifications_url":"https://api.github.com/repos/home-assistant/home-assistant/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/home-assistant/home-assistant/labels{/name}","releases_url":"https://api.github.com/repos/home-assistant/home-assistant/releases{/id}","deployments_url":"https://api.github.com/repos/home-assistant/home-assistant/deployments","created_at":"2013-09-17T07:29:48Z","updated_at":"2017-10-19T16:09:20Z","pushed_at":"2017-10-19T16:18:55Z","git_url":"git://github.com/home-assistant/home-assistant.git","ssh_url":"git@github.com:home-assistant/home-assistant.git","clone_url":"https://github.com/home-assistant/home-assistant.git","svn_url":"https://github.com/home-assistant/home-assistant","homepage":"https://home-assistant.io","size":73975,"stargazers_count":8644,"watchers_count":8644,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2689,"mirror_url":null,"open_issues_count":538,"forks":2689,"open_issues":538,"watchers":8644,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/home-assistant/home-assistant/pulls/9739"},"html":{"href":"https://github.com/home-assistant/home-assistant/pull/9739"},"issue":{"href":"https://api.github.com/repos/home-assistant/home-assistant/issues/9739"},"comments":{"href":"https://api.github.com/repos/home-assistant/home-assistant/issues/9739/comments"},"review_comments":{"href":"https://api.github.com/repos/home-assistant/home-assistant/pulls/9739/comments"},"review_comment":{"href":"https://api.github.com/repos/home-assistant/home-assistant/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/home-assistant/home-assistant/pulls/9739/commits"},"statuses":{"href":"https://api.github.com/repos/home-assistant/home-assistant/statuses/64519f72b1aaae198b86eb3fb63e91937eee133f"}},"author_association":"NONE"}}
{"actor":{"display_login":"armills"}}