{"action":"created","comment":{"url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/comments/85675844","pull_request_review_id":6377814,"id":85675844,"diff_hunk":"@@ -300,6 +300,23 @@ def test_see_service(self, mock_see):\n         self.assertEqual(mock_see.call_count, 1)\n         self.assertEqual(mock_see.call_args, call(**params))\n \n+    def test_new_device_event_fired(self):\n+        \"\"\"Test that the device tracker will fire an event.\"\"\"\n+        self.assertTrue(setup_component(self.hass, device_tracker.DOMAIN,\n+                                        TEST_PLATFORM))\n+        test_events = []\n+\n+        def listener(event):\n+            \"\"\"Helper method that will verify our event got called.\"\"\"\n+            test_events.append(event)\n+\n+        self.hass.bus.listen(\"new_device_discovered\", listener)\n+\n+        device_tracker.see(self.hass, 'mac_1', host_name='hello')","path":"tests/components/device_tracker/test_init.py","position":16,"original_position":16,"commit_id":"376943c8e7e9edee11a3b8285bc9962565737945","original_commit_id":"376943c8e7e9edee11a3b8285bc9962565737945","user":{"login":"balloob","id":1444314,"avatar_url":"https://avatars.githubusercontent.com/u/1444314?v=3","gravatar_id":"","url":"https://api.github.com/users/balloob","html_url":"https://github.com/balloob","followers_url":"https://api.github.com/users/balloob/followers","following_url":"https://api.github.com/users/balloob/following{/other_user}","gists_url":"https://api.github.com/users/balloob/gists{/gist_id}","starred_url":"https://api.github.com/users/balloob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balloob/subscriptions","organizations_url":"https://api.github.com/users/balloob/orgs","repos_url":"https://api.github.com/users/balloob/repos","events_url":"https://api.github.com/users/balloob/events{/privacy}","received_events_url":"https://api.github.com/users/balloob/received_events","type":"User","site_admin":false},"body":"Can you verify that the event is only fired once for each device?","created_at":"2016-10-31T01:21:33Z","updated_at":"2016-10-31T01:21:33Z","html_url":"https://github.com/home-assistant/home-assistant/pull/4132#discussion_r85675844","pull_request_url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/4132","_links":{"self":{"href":"https://api.github.com/repos/home-assistant/home-assistant/pulls/comments/85675844"},"html":{"href":"https://github.com/home-assistant/home-assistant/pull/4132#discussion_r85675844"},"pull_request":{"href":"https://api.github.com/repos/home-assistant/home-assistant/pulls/4132"}}},"pull_request":{"url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/4132","id":91515262,"html_url":"https://github.com/home-assistant/home-assistant/pull/4132","diff_url":"https://github.com/home-assistant/home-assistant/pull/4132.diff","patch_url":"https://github.com/home-assistant/home-assistant/pull/4132.patch","issue_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/4132","number":4132,"state":"open","locked":false,"title":"Add new_device_discovered event","user":{"login":"lwis","id":873275,"avatar_url":"https://avatars.githubusercontent.com/u/873275?v=3","gravatar_id":"","url":"https://api.github.com/users/lwis","html_url":"https://github.com/lwis","followers_url":"https://api.github.com/users/lwis/followers","following_url":"https://api.github.com/users/lwis/following{/other_user}","gists_url":"https://api.github.com/users/lwis/gists{/gist_id}","starred_url":"https://api.github.com/users/lwis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lwis/subscriptions","organizations_url":"https://api.github.com/users/lwis/orgs","repos_url":"https://api.github.com/users/lwis/repos","events_url":"https://api.github.com/users/lwis/events{/privacy}","received_events_url":"https://api.github.com/users/lwis/received_events","type":"User","site_admin":false},"body":"**Description:**\r\n\r\nFire an event when a new device is discovered.\r\n\r\n**Checklist:**\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.","created_at":"2016-10-30T08:47:47Z","updated_at":"2016-10-31T01:21:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"82099a9e2c8d0878552e06664cc552e54890635a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/4132/commits","review_comments_url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/4132/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/4132/comments","statuses_url":"https://api.github.com/repos/home-assistant/home-assistant/statuses/376943c8e7e9edee11a3b8285bc9962565737945","head":{"label":"lwis:new_device_event","ref":"new_device_event","sha":"376943c8e7e9edee11a3b8285bc9962565737945","user":{"login":"lwis","id":873275,"avatar_url":"https://avatars.githubusercontent.com/u/873275?v=3","gravatar_id":"","url":"https://api.github.com/users/lwis","html_url":"https://github.com/lwis","followers_url":"https://api.github.com/users/lwis/followers","following_url":"https://api.github.com/users/lwis/following{/other_user}","gists_url":"https://api.github.com/users/lwis/gists{/gist_id}","starred_url":"https://api.github.com/users/lwis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lwis/subscriptions","organizations_url":"https://api.github.com/users/lwis/orgs","repos_url":"https://api.github.com/users/lwis/repos","events_url":"https://api.github.com/users/lwis/events{/privacy}","received_events_url":"https://api.github.com/users/lwis/received_events","type":"User","site_admin":false},"repo":{"id":67117632,"name":"home-assistant","full_name":"lwis/home-assistant","owner":{"login":"lwis","id":873275,"avatar_url":"https://avatars.githubusercontent.com/u/873275?v=3","gravatar_id":"","url":"https://api.github.com/users/lwis","html_url":"https://github.com/lwis","followers_url":"https://api.github.com/users/lwis/followers","following_url":"https://api.github.com/users/lwis/following{/other_user}","gists_url":"https://api.github.com/users/lwis/gists{/gist_id}","starred_url":"https://api.github.com/users/lwis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lwis/subscriptions","organizations_url":"https://api.github.com/users/lwis/orgs","repos_url":"https://api.github.com/users/lwis/repos","events_url":"https://api.github.com/users/lwis/events{/privacy}","received_events_url":"https://api.github.com/users/lwis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lwis/home-assistant","description":":house_with_garden: Open-source home automation platform running on Python 3","fork":true,"url":"https://api.github.com/repos/lwis/home-assistant","forks_url":"https://api.github.com/repos/lwis/home-assistant/forks","keys_url":"https://api.github.com/repos/lwis/home-assistant/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lwis/home-assistant/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lwis/home-assistant/teams","hooks_url":"https://api.github.com/repos/lwis/home-assistant/hooks","issue_events_url":"https://api.github.com/repos/lwis/home-assistant/issues/events{/number}","events_url":"https://api.github.com/repos/lwis/home-assistant/events","assignees_url":"https://api.github.com/repos/lwis/home-assistant/assignees{/user}","branches_url":"https://api.github.com/repos/lwis/home-assistant/branches{/branch}","tags_url":"https://api.github.com/repos/lwis/home-assistant/tags","blobs_url":"https://api.github.com/repos/lwis/home-assistant/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lwis/home-assistant/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lwis/home-assistant/git/refs{/sha}","trees_url":"https://api.github.com/repos/lwis/home-assistant/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lwis/home-assistant/statuses/{sha}","languages_url":"https://api.github.com/repos/lwis/home-assistant/languages","stargazers_url":"https://api.github.com/repos/lwis/home-assistant/stargazers","contributors_url":"https://api.github.com/repos/lwis/home-assistant/contributors","subscribers_url":"https://api.github.com/repos/lwis/home-assistant/subscribers","subscription_url":"https://api.github.com/repos/lwis/home-assistant/subscription","commits_url":"https://api.github.com/repos/lwis/home-assistant/commits{/sha}","git_commits_url":"https://api.github.com/repos/lwis/home-assistant/git/commits{/sha}","comments_url":"https://api.github.com/repos/lwis/home-assistant/comments{/number}","issue_comment_url":"https://api.github.com/repos/lwis/home-assistant/issues/comments{/number}","contents_url":"https://api.github.com/repos/lwis/home-assistant/contents/{+path}","compare_url":"https://api.github.com/repos/lwis/home-assistant/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lwis/home-assistant/merges","archive_url":"https://api.github.com/repos/lwis/home-assistant/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lwis/home-assistant/downloads","issues_url":"https://api.github.com/repos/lwis/home-assistant/issues{/number}","pulls_url":"https://api.github.com/repos/lwis/home-assistant/pulls{/number}","milestones_url":"https://api.github.com/repos/lwis/home-assistant/milestones{/number}","notifications_url":"https://api.github.com/repos/lwis/home-assistant/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lwis/home-assistant/labels{/name}","releases_url":"https://api.github.com/repos/lwis/home-assistant/releases{/id}","deployments_url":"https://api.github.com/repos/lwis/home-assistant/deployments","created_at":"2016-09-01T09:27:55Z","updated_at":"2016-10-26T18:07:09Z","pushed_at":"2016-10-30T08:46:41Z","git_url":"git://github.com/lwis/home-assistant.git","ssh_url":"git@github.com:lwis/home-assistant.git","clone_url":"https://github.com/lwis/home-assistant.git","svn_url":"https://github.com/lwis/home-assistant","homepage":"https://home-assistant.io","size":42117,"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":"e6ece4bf6d9d38a5361342a22943233f51485aaa","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-10-31T00:45:55Z","pushed_at":"2016-10-31T01:02:59Z","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":84662,"stargazers_count":4439,"watchers_count":4439,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1158,"mirror_url":null,"open_issues_count":331,"forks":1158,"open_issues":331,"watchers":4439,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/home-assistant/home-assistant/pulls/4132"},"html":{"href":"https://github.com/home-assistant/home-assistant/pull/4132"},"issue":{"href":"https://api.github.com/repos/home-assistant/home-assistant/issues/4132"},"comments":{"href":"https://api.github.com/repos/home-assistant/home-assistant/issues/4132/comments"},"review_comments":{"href":"https://api.github.com/repos/home-assistant/home-assistant/pulls/4132/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/4132/commits"},"statuses":{"href":"https://api.github.com/repos/home-assistant/home-assistant/statuses/376943c8e7e9edee11a3b8285bc9962565737945"}}}}
{"actor":{"display_login":"balloob"}}