{"action":"created","comment":{"url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/comments/86686151","pull_request_review_id":7332686,"id":86686151,"diff_hunk":"@@ -0,0 +1,786 @@\n+\"\"\"\n+Test the Soundtouch component\n+\"\"\"\n+import logging\n+import unittest\n+from unittest import mock\n+\n+from homeassistant.components.media_player import soundtouch\n+from homeassistant.components.media_player.soundtouch import SoundTouchDevice\n+from homeassistant.const import (\n+    STATE_OFF, STATE_UNKNOWN, STATE_PAUSED, STATE_PLAYING,\n+    STATE_UNAVAILABLE)\n+from tests.common import get_test_home_assistant\n+\n+class MockService:\n+    \"\"\"Mock Soundtouch service\"\"\"\n+    def __init__(self, master, slaves):","path":"tests/components/media_player/test_soundtouch.py","position":17,"original_position":17,"commit_id":"d7a2721dbd0881748bdf38190ef5206cd3b87b69","original_commit_id":"d7a2721dbd0881748bdf38190ef5206cd3b87b69","user":{"login":"balloobbot","id":16367972,"avatar_url":"https://avatars.githubusercontent.com/u/16367972?v=3","gravatar_id":"","url":"https://api.github.com/users/balloobbot","html_url":"https://github.com/balloobbot","followers_url":"https://api.github.com/users/balloobbot/followers","following_url":"https://api.github.com/users/balloobbot/following{/other_user}","gists_url":"https://api.github.com/users/balloobbot/gists{/gist_id}","starred_url":"https://api.github.com/users/balloobbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balloobbot/subscriptions","organizations_url":"https://api.github.com/users/balloobbot/orgs","repos_url":"https://api.github.com/users/balloobbot/repos","events_url":"https://api.github.com/users/balloobbot/events{/privacy}","received_events_url":"https://api.github.com/users/balloobbot/received_events","type":"User","site_admin":false},"body":"_[farcy v1.1](https://github.com/appfolio/farcy)_\n* D102: Missing docstring in public method","created_at":"2016-11-06T13:17:42Z","updated_at":"2016-11-06T13:17:42Z","html_url":"https://github.com/home-assistant/home-assistant/pull/4242#discussion_r86686151","pull_request_url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/4242","_links":{"self":{"href":"https://api.github.com/repos/home-assistant/home-assistant/pulls/comments/86686151"},"html":{"href":"https://github.com/home-assistant/home-assistant/pull/4242#discussion_r86686151"},"pull_request":{"href":"https://api.github.com/repos/home-assistant/home-assistant/pulls/4242"}}},"pull_request":{"url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/4242","id":92487077,"html_url":"https://github.com/home-assistant/home-assistant/pull/4242","diff_url":"https://github.com/home-assistant/home-assistant/pull/4242.diff","patch_url":"https://github.com/home-assistant/home-assistant/pull/4242.patch","issue_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/4242","number":4242,"state":"open","locked":false,"title":"Add Bose Soundtouch component","user":{"login":"CharlesBlonde","id":1319920,"avatar_url":"https://avatars.githubusercontent.com/u/1319920?v=3","gravatar_id":"","url":"https://api.github.com/users/CharlesBlonde","html_url":"https://github.com/CharlesBlonde","followers_url":"https://api.github.com/users/CharlesBlonde/followers","following_url":"https://api.github.com/users/CharlesBlonde/following{/other_user}","gists_url":"https://api.github.com/users/CharlesBlonde/gists{/gist_id}","starred_url":"https://api.github.com/users/CharlesBlonde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CharlesBlonde/subscriptions","organizations_url":"https://api.github.com/users/CharlesBlonde/orgs","repos_url":"https://api.github.com/users/CharlesBlonde/repos","events_url":"https://api.github.com/users/CharlesBlonde/events{/privacy}","received_events_url":"https://api.github.com/users/CharlesBlonde/received_events","type":"User","site_admin":false},"body":"**Description:**\r\n\r\nAdd support to Bose Soundtouch multi-rooms speakers (https://www.bose.com/en_us/products/speakers/wireless_speakers/soundtouch-10-wireless-system.html).\r\n\r\nThis PR add support for the following media supports:\r\n* DLNA\r\n* Radio\r\n* Spotify\r\n\r\nI'm unable to test others (Google Music, Deezer, Apple Music, ...) because I don't have any accounts but I should be able to create trial accounts in order to implement theses providers in the future.\r\n\r\nMulti-room is fully supported.\r\n\r\nI'm not a *native* Python developer and I didn't know all quality software tools used by Home Assistant (Tox, Pylint, ...) so I tried to do my best but any feedback are welcome.\r\nI have errors with Tox but I guess nothing related to this PR.\r\n\r\n**Related issue (if applicable):** No\r\n\r\n**Pull request in [home-assistant.github.io](https://github.com/home-assistant/home-assistant.github.io) with documentation (if applicable):**\r\n\r\nI'll start working on the documentation after submitting this PR\r\n\r\n**Example entry for `configuration.yaml` (if applicable):**\r\n\r\n## Defined devices\r\n\r\n```yaml\r\nmedia_player:\r\n  - platform: soundtouch\r\n    host: 192.168.1.1\r\n    port: 8090\r\n    name: Soundtouch Living Room\r\n  - platform: soundtouch\r\n    host: 192.168.1.2\r\n    port: 8090\r\n    name: Soundtouch Kitchen\r\n...\r\n```\r\n\r\n## Play media\r\nSoundtouch devices support 6 presets who can be used in order to change the selection\r\n\r\n```yaml\r\n- service: media_player.play_media\r\n  data:\r\n    entity_id: media_player.soundtouch_living_room\r\n    media_content_id: <1-6>\r\n    media_content_type: PLAYLIST\r\n```\r\n\r\n## Multi-room\r\n\r\nIn order to use multi-room ('Zone' in soundtouch vocabulary):\r\n\r\n### Create a zone and play on all other slaves\r\n\r\n```yaml\r\nautomation:\r\n  - alias: Play everywhere\r\n    trigger:\r\n       ...\r\n    action:\r\n      - service: media_player.soundtouch_play_everywhere\r\n        data:\r\n          master: media_player.soundtouch_living_room\r\n```\r\n\r\n### Creating a zone with one master and two slaves\r\n\r\n```yaml\r\n- service: media_player.soundtouch_create_zone\r\n  data:\r\n    master: media_player.soundtouch_living_room\r\n    slaves:\r\n      - media_player.soundtouch_room\r\n      - media_player.soundtouch_kitchen\r\n```\r\n\r\n### Adding a slave to an existing zone\r\n\r\n```yaml\r\n- service: media_player.soundtouch_add_zone_slave\r\n  data:\r\n    master: media_player.soundtouch_living_room\r\n    slaves:\r\n      - media_player.soundtouch_room      \r\n```\r\n\r\n### Removing a slave from a zone (removing all slaves delete the zone)\r\n\r\n```yaml\r\n- service: media_player.soundtouch_remove_zone_slave\r\n  data:\r\n    master: media_player.soundtouch_living_room\r\n    slaves:\r\n      - media_player.soundtouch_room      \r\n```\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) => Not yet\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  - [X] New dependencies are only imported inside functions that use them ([example][ex-import]).\r\n  - [X] New dependencies have been added to `requirements_all.txt` by running `script/gen_requirements_all.py`.\r\n  - [X] New files were added to `.coveragerc`. => Unit tests added so I didn't update this file\r\n\r\nIf the code does not interact with devices:\r\n  - [X] Local tests with `tox` run successfully. **Your PR cannot be merged unless tests pass**\r\n  - [X] Tests have been added to verify that the new code works.\r\n\r\n[ex-requir]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard.py#L16\r\n[ex-import]: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/keyboard.py#L51\r\n","created_at":"2016-11-06T13:16:38Z","updated_at":"2016-11-06T13:17:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"81ca746525efd9fd44236b2ceaafd469d110c169","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/4242/commits","review_comments_url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/4242/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/4242/comments","statuses_url":"https://api.github.com/repos/home-assistant/home-assistant/statuses/d7a2721dbd0881748bdf38190ef5206cd3b87b69","head":{"label":"CharlesBlonde:soundtouch","ref":"soundtouch","sha":"d7a2721dbd0881748bdf38190ef5206cd3b87b69","user":{"login":"CharlesBlonde","id":1319920,"avatar_url":"https://avatars.githubusercontent.com/u/1319920?v=3","gravatar_id":"","url":"https://api.github.com/users/CharlesBlonde","html_url":"https://github.com/CharlesBlonde","followers_url":"https://api.github.com/users/CharlesBlonde/followers","following_url":"https://api.github.com/users/CharlesBlonde/following{/other_user}","gists_url":"https://api.github.com/users/CharlesBlonde/gists{/gist_id}","starred_url":"https://api.github.com/users/CharlesBlonde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CharlesBlonde/subscriptions","organizations_url":"https://api.github.com/users/CharlesBlonde/orgs","repos_url":"https://api.github.com/users/CharlesBlonde/repos","events_url":"https://api.github.com/users/CharlesBlonde/events{/privacy}","received_events_url":"https://api.github.com/users/CharlesBlonde/received_events","type":"User","site_admin":false},"repo":{"id":71291229,"name":"home-assistant","full_name":"CharlesBlonde/home-assistant","owner":{"login":"CharlesBlonde","id":1319920,"avatar_url":"https://avatars.githubusercontent.com/u/1319920?v=3","gravatar_id":"","url":"https://api.github.com/users/CharlesBlonde","html_url":"https://github.com/CharlesBlonde","followers_url":"https://api.github.com/users/CharlesBlonde/followers","following_url":"https://api.github.com/users/CharlesBlonde/following{/other_user}","gists_url":"https://api.github.com/users/CharlesBlonde/gists{/gist_id}","starred_url":"https://api.github.com/users/CharlesBlonde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CharlesBlonde/subscriptions","organizations_url":"https://api.github.com/users/CharlesBlonde/orgs","repos_url":"https://api.github.com/users/CharlesBlonde/repos","events_url":"https://api.github.com/users/CharlesBlonde/events{/privacy}","received_events_url":"https://api.github.com/users/CharlesBlonde/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/CharlesBlonde/home-assistant","description":":house_with_garden: Open-source home automation platform running on Python 3","fork":true,"url":"https://api.github.com/repos/CharlesBlonde/home-assistant","forks_url":"https://api.github.com/repos/CharlesBlonde/home-assistant/forks","keys_url":"https://api.github.com/repos/CharlesBlonde/home-assistant/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CharlesBlonde/home-assistant/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CharlesBlonde/home-assistant/teams","hooks_url":"https://api.github.com/repos/CharlesBlonde/home-assistant/hooks","issue_events_url":"https://api.github.com/repos/CharlesBlonde/home-assistant/issues/events{/number}","events_url":"https://api.github.com/repos/CharlesBlonde/home-assistant/events","assignees_url":"https://api.github.com/repos/CharlesBlonde/home-assistant/assignees{/user}","branches_url":"https://api.github.com/repos/CharlesBlonde/home-assistant/branches{/branch}","tags_url":"https://api.github.com/repos/CharlesBlonde/home-assistant/tags","blobs_url":"https://api.github.com/repos/CharlesBlonde/home-assistant/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CharlesBlonde/home-assistant/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CharlesBlonde/home-assistant/git/refs{/sha}","trees_url":"https://api.github.com/repos/CharlesBlonde/home-assistant/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CharlesBlonde/home-assistant/statuses/{sha}","languages_url":"https://api.github.com/repos/CharlesBlonde/home-assistant/languages","stargazers_url":"https://api.github.com/repos/CharlesBlonde/home-assistant/stargazers","contributors_url":"https://api.github.com/repos/CharlesBlonde/home-assistant/contributors","subscribers_url":"https://api.github.com/repos/CharlesBlonde/home-assistant/subscribers","subscription_url":"https://api.github.com/repos/CharlesBlonde/home-assistant/subscription","commits_url":"https://api.github.com/repos/CharlesBlonde/home-assistant/commits{/sha}","git_commits_url":"https://api.github.com/repos/CharlesBlonde/home-assistant/git/commits{/sha}","comments_url":"https://api.github.com/repos/CharlesBlonde/home-assistant/comments{/number}","issue_comment_url":"https://api.github.com/repos/CharlesBlonde/home-assistant/issues/comments{/number}","contents_url":"https://api.github.com/repos/CharlesBlonde/home-assistant/contents/{+path}","compare_url":"https://api.github.com/repos/CharlesBlonde/home-assistant/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CharlesBlonde/home-assistant/merges","archive_url":"https://api.github.com/repos/CharlesBlonde/home-assistant/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CharlesBlonde/home-assistant/downloads","issues_url":"https://api.github.com/repos/CharlesBlonde/home-assistant/issues{/number}","pulls_url":"https://api.github.com/repos/CharlesBlonde/home-assistant/pulls{/number}","milestones_url":"https://api.github.com/repos/CharlesBlonde/home-assistant/milestones{/number}","notifications_url":"https://api.github.com/repos/CharlesBlonde/home-assistant/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CharlesBlonde/home-assistant/labels{/name}","releases_url":"https://api.github.com/repos/CharlesBlonde/home-assistant/releases{/id}","deployments_url":"https://api.github.com/repos/CharlesBlonde/home-assistant/deployments","created_at":"2016-10-18T21:04:48Z","updated_at":"2016-10-18T21:04:52Z","pushed_at":"2016-11-06T12:15:07Z","git_url":"git://github.com/CharlesBlonde/home-assistant.git","ssh_url":"git@github.com:CharlesBlonde/home-assistant.git","clone_url":"https://github.com/CharlesBlonde/home-assistant.git","svn_url":"https://github.com/CharlesBlonde/home-assistant","homepage":"https://home-assistant.io","size":43195,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"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":"c980d26aae66f4a7ab3ffa4f87630f9608c3a81d","user":{"login":"home-assistant","id":13844975,"avatar_url":"https://avatars.githubusercontent.com/u/13844975?v=3","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://avatars.githubusercontent.com/u/13844975?v=3","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":"2016-11-06T11:37:49Z","pushed_at":"2016-11-06T13:16:38Z","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":85326,"stargazers_count":4554,"watchers_count":4554,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1175,"mirror_url":null,"open_issues_count":331,"forks":1175,"open_issues":331,"watchers":4554,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/home-assistant/home-assistant/pulls/4242"},"html":{"href":"https://github.com/home-assistant/home-assistant/pull/4242"},"issue":{"href":"https://api.github.com/repos/home-assistant/home-assistant/issues/4242"},"comments":{"href":"https://api.github.com/repos/home-assistant/home-assistant/issues/4242/comments"},"review_comments":{"href":"https://api.github.com/repos/home-assistant/home-assistant/pulls/4242/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/4242/commits"},"statuses":{"href":"https://api.github.com/repos/home-assistant/home-assistant/statuses/d7a2721dbd0881748bdf38190ef5206cd3b87b69"}}}}
{"actor":{"display_login":"balloobbot"}}