{"action":"created","comment":{"url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/comments/72891540","id":72891540,"diff_hunk":"@@ -144,19 +157,30 @@ def update(self):\n             self._muted = self._client.get_muted()\n             self._volume = self._client.get_volume()\n             self._current_source_id = self._client.get_input()\n-\n             self._source_list = {}\n-            self._source_label_list = []\n             self._app_list = {}\n+\n+            custom_sources = []\n+            for source in self._customize.get('sources', {}):\n+                app_id = WEBOS_APPS_SHORT.get(source, None)\n+                if app_id:\n+                    custom_sources.append(app_id)\n+                else:\n+                    custom_sources.append(source)\n+\n             for app in self._client.get_apps():\n                 self._app_list[app['id']] = app\n+                if app['id'] == self._current_source_id:\n+                    self._current_source = app['title']\n+                    self._source_list[app['title']] = app","path":"homeassistant/components/media_player/webostv.py","position":100,"original_position":100,"commit_id":"3695941c322dbee471eb93e858acc8ccff8df7d7","original_commit_id":"3695941c322dbee471eb93e858acc8ccff8df7d7","user":{"login":"Teagan42","id":2989925,"avatar_url":"https://avatars.githubusercontent.com/u/2989925?v=3","gravatar_id":"","url":"https://api.github.com/users/Teagan42","html_url":"https://github.com/Teagan42","followers_url":"https://api.github.com/users/Teagan42/followers","following_url":"https://api.github.com/users/Teagan42/following{/other_user}","gists_url":"https://api.github.com/users/Teagan42/gists{/gist_id}","starred_url":"https://api.github.com/users/Teagan42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Teagan42/subscriptions","organizations_url":"https://api.github.com/users/Teagan42/orgs","repos_url":"https://api.github.com/users/Teagan42/repos","events_url":"https://api.github.com/users/Teagan42/events{/privacy}","received_events_url":"https://api.github.com/users/Teagan42/received_events","type":"User","site_admin":false},"body":"Is this line necessary? Won't line 176 catch it?","created_at":"2016-07-30T17:48:31Z","updated_at":"2016-07-30T17:48:31Z","html_url":"https://github.com/home-assistant/home-assistant/pull/2561#discussion_r72891540","pull_request_url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/2561","_links":{"self":{"href":"https://api.github.com/repos/home-assistant/home-assistant/pulls/comments/72891540"},"html":{"href":"https://github.com/home-assistant/home-assistant/pull/2561#discussion_r72891540"},"pull_request":{"href":"https://api.github.com/repos/home-assistant/home-assistant/pulls/2561"}}},"pull_request":{"url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/2561","id":77920862,"html_url":"https://github.com/home-assistant/home-assistant/pull/2561","diff_url":"https://github.com/home-assistant/home-assistant/pull/2561.diff","patch_url":"https://github.com/home-assistant/home-assistant/pull/2561.patch","issue_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/2561","number":2561,"state":"open","locked":false,"title":"Add webos customize option to add custom sources","user":{"login":"roidayan","id":660126,"avatar_url":"https://avatars.githubusercontent.com/u/660126?v=3","gravatar_id":"","url":"https://api.github.com/users/roidayan","html_url":"https://github.com/roidayan","followers_url":"https://api.github.com/users/roidayan/followers","following_url":"https://api.github.com/users/roidayan/following{/other_user}","gists_url":"https://api.github.com/users/roidayan/gists{/gist_id}","starred_url":"https://api.github.com/users/roidayan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roidayan/subscriptions","organizations_url":"https://api.github.com/users/roidayan/orgs","repos_url":"https://api.github.com/users/roidayan/repos","events_url":"https://api.github.com/users/roidayan/events{/privacy}","received_events_url":"https://api.github.com/users/roidayan/received_events","type":"User","site_admin":false},"body":"**Description:**\r\n\r\nAdd webos customize option to add custom sources\r\n\r\nCurrently there are only hw inputs in the sources list.\r\nOther interesting inputs can be live tv (dvbt) and vod apps.\r\n\r\n* add customize option for webos.\r\n* add short names for livetv, youtube, mako apps.\r\n* add current app as a source.\r\n* use large icon (largeIcon is the same as icon if doesn't exists)\r\n* filter out hw inputs that are not connected.\r\n\r\n**Related issue (if applicable):** fixes #\r\n\r\n**Pull request in [home-assistant.io](https://github.com/home-assistant/home-assistant.io) with documentation (if applicable):** home-assistant/home-assistant.io#\r\n\r\n**Example entry for `configuration.yaml` (if applicable):**\r\n```yaml\r\nmedia_player:\r\n  - platform: webostv\r\n    host: 192.168.14.163\r\n    customize:\r\n      sources:\r\n        - livetv\r\n        - youtube\r\n        - makotv\r\n```\r\n\r\n**Checklist:**\r\n  - [ ] Documentation added/updated in [home-assistant.io](https://github.com/home-assistant/home-assistant.io)\r\n  - [x] Local tests with `tox` run successfully. **Your PR cannot be merged unless tests pass**\r\n\r\nSigned-off-by: Roi Dayan <roi.dayan@gmail.com>","created_at":"2016-07-19T05:47:53Z","updated_at":"2016-07-30T17:48:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6c70ce1cd383f6e4751e3d9fd71a31cfc84f42da","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/2561/commits","review_comments_url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/2561/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/2561/comments","statuses_url":"https://api.github.com/repos/home-assistant/home-assistant/statuses/3695941c322dbee471eb93e858acc8ccff8df7d7","head":{"label":"roidayan:update_webos_component","ref":"update_webos_component","sha":"3695941c322dbee471eb93e858acc8ccff8df7d7","user":{"login":"roidayan","id":660126,"avatar_url":"https://avatars.githubusercontent.com/u/660126?v=3","gravatar_id":"","url":"https://api.github.com/users/roidayan","html_url":"https://github.com/roidayan","followers_url":"https://api.github.com/users/roidayan/followers","following_url":"https://api.github.com/users/roidayan/following{/other_user}","gists_url":"https://api.github.com/users/roidayan/gists{/gist_id}","starred_url":"https://api.github.com/users/roidayan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roidayan/subscriptions","organizations_url":"https://api.github.com/users/roidayan/orgs","repos_url":"https://api.github.com/users/roidayan/repos","events_url":"https://api.github.com/users/roidayan/events{/privacy}","received_events_url":"https://api.github.com/users/roidayan/received_events","type":"User","site_admin":false},"repo":{"id":57139931,"name":"home-assistant","full_name":"roidayan/home-assistant","owner":{"login":"roidayan","id":660126,"avatar_url":"https://avatars.githubusercontent.com/u/660126?v=3","gravatar_id":"","url":"https://api.github.com/users/roidayan","html_url":"https://github.com/roidayan","followers_url":"https://api.github.com/users/roidayan/followers","following_url":"https://api.github.com/users/roidayan/following{/other_user}","gists_url":"https://api.github.com/users/roidayan/gists{/gist_id}","starred_url":"https://api.github.com/users/roidayan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roidayan/subscriptions","organizations_url":"https://api.github.com/users/roidayan/orgs","repos_url":"https://api.github.com/users/roidayan/repos","events_url":"https://api.github.com/users/roidayan/events{/privacy}","received_events_url":"https://api.github.com/users/roidayan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/roidayan/home-assistant","description":":house_with_garden: Open-source home automation platform running on Python 3","fork":true,"url":"https://api.github.com/repos/roidayan/home-assistant","forks_url":"https://api.github.com/repos/roidayan/home-assistant/forks","keys_url":"https://api.github.com/repos/roidayan/home-assistant/keys{/key_id}","collaborators_url":"https://api.github.com/repos/roidayan/home-assistant/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/roidayan/home-assistant/teams","hooks_url":"https://api.github.com/repos/roidayan/home-assistant/hooks","issue_events_url":"https://api.github.com/repos/roidayan/home-assistant/issues/events{/number}","events_url":"https://api.github.com/repos/roidayan/home-assistant/events","assignees_url":"https://api.github.com/repos/roidayan/home-assistant/assignees{/user}","branches_url":"https://api.github.com/repos/roidayan/home-assistant/branches{/branch}","tags_url":"https://api.github.com/repos/roidayan/home-assistant/tags","blobs_url":"https://api.github.com/repos/roidayan/home-assistant/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/roidayan/home-assistant/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/roidayan/home-assistant/git/refs{/sha}","trees_url":"https://api.github.com/repos/roidayan/home-assistant/git/trees{/sha}","statuses_url":"https://api.github.com/repos/roidayan/home-assistant/statuses/{sha}","languages_url":"https://api.github.com/repos/roidayan/home-assistant/languages","stargazers_url":"https://api.github.com/repos/roidayan/home-assistant/stargazers","contributors_url":"https://api.github.com/repos/roidayan/home-assistant/contributors","subscribers_url":"https://api.github.com/repos/roidayan/home-assistant/subscribers","subscription_url":"https://api.github.com/repos/roidayan/home-assistant/subscription","commits_url":"https://api.github.com/repos/roidayan/home-assistant/commits{/sha}","git_commits_url":"https://api.github.com/repos/roidayan/home-assistant/git/commits{/sha}","comments_url":"https://api.github.com/repos/roidayan/home-assistant/comments{/number}","issue_comment_url":"https://api.github.com/repos/roidayan/home-assistant/issues/comments{/number}","contents_url":"https://api.github.com/repos/roidayan/home-assistant/contents/{+path}","compare_url":"https://api.github.com/repos/roidayan/home-assistant/compare/{base}...{head}","merges_url":"https://api.github.com/repos/roidayan/home-assistant/merges","archive_url":"https://api.github.com/repos/roidayan/home-assistant/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/roidayan/home-assistant/downloads","issues_url":"https://api.github.com/repos/roidayan/home-assistant/issues{/number}","pulls_url":"https://api.github.com/repos/roidayan/home-assistant/pulls{/number}","milestones_url":"https://api.github.com/repos/roidayan/home-assistant/milestones{/number}","notifications_url":"https://api.github.com/repos/roidayan/home-assistant/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/roidayan/home-assistant/labels{/name}","releases_url":"https://api.github.com/repos/roidayan/home-assistant/releases{/id}","deployments_url":"https://api.github.com/repos/roidayan/home-assistant/deployments","created_at":"2016-04-26T15:30:08Z","updated_at":"2016-04-26T15:30:10Z","pushed_at":"2016-07-19T10:00:00Z","git_url":"git://github.com/roidayan/home-assistant.git","ssh_url":"git@github.com:roidayan/home-assistant.git","clone_url":"https://github.com/roidayan/home-assistant.git","svn_url":"https://github.com/roidayan/home-assistant","homepage":"https://home-assistant.io","size":34477,"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":"7c431911d1e83b6ef5f72de04ecfb5a42614554b","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-07-30T17:21:08Z","pushed_at":"2016-07-30T17:40: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":97330,"stargazers_count":3783,"watchers_count":3783,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":848,"mirror_url":null,"open_issues_count":163,"forks":848,"open_issues":163,"watchers":3783,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/home-assistant/home-assistant/pulls/2561"},"html":{"href":"https://github.com/home-assistant/home-assistant/pull/2561"},"issue":{"href":"https://api.github.com/repos/home-assistant/home-assistant/issues/2561"},"comments":{"href":"https://api.github.com/repos/home-assistant/home-assistant/issues/2561/comments"},"review_comments":{"href":"https://api.github.com/repos/home-assistant/home-assistant/pulls/2561/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/2561/commits"},"statuses":{"href":"https://api.github.com/repos/home-assistant/home-assistant/statuses/3695941c322dbee471eb93e858acc8ccff8df7d7"}}}}
{"actor":{"display_login":"Teagan42"}}