{"action":"created","comment":{"url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/comments/99933645","pull_request_review_id":20624658,"id":99933645,"diff_hunk":"@@ -178,11 +177,10 @@ def put(self, request, username, entity_number):\n         # Make sure the entity actually supports brightness\n         entity_features = entity.attributes.get(ATTR_SUPPORTED_FEATURES, 0)\n \n-        if (entity_features &\n-                SUPPORT_BRIGHTNESS &\n-                (entity.domain == \"light\")) == SUPPORT_BRIGHTNESS:\n-            if brightness is not None:\n-                data[ATTR_BRIGHTNESS] = brightness\n+        if entity.domain == \"light\":\n+            if (entity_features & SUPPORT_BRIGHTNESS) == SUPPORT_BRIGHTNESS:","path":"homeassistant/components/emulated_hue/hue_api.py","position":28,"original_position":28,"commit_id":"b07f431e7cf040896fea2f068ccb56dbf719a439","original_commit_id":"b07f431e7cf040896fea2f068ccb56dbf719a439","user":{"login":"armills","id":1386547,"avatar_url":"https://avatars.githubusercontent.com/u/1386547?v=3","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":"I had that thought going through this, but I wasn't sure I wanted to tackle it in this PR. I suppose that since I'm touching it though I should clean it up. 😄 ","created_at":"2017-02-07T21:28:12Z","updated_at":"2017-02-07T21:28:13Z","html_url":"https://github.com/home-assistant/home-assistant/pull/5794#discussion_r99933645","pull_request_url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/5794","_links":{"self":{"href":"https://api.github.com/repos/home-assistant/home-assistant/pulls/comments/99933645"},"html":{"href":"https://github.com/home-assistant/home-assistant/pull/5794#discussion_r99933645"},"pull_request":{"href":"https://api.github.com/repos/home-assistant/home-assistant/pulls/5794"}}},"pull_request":{"url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/5794","id":105089298,"html_url":"https://github.com/home-assistant/home-assistant/pull/5794","diff_url":"https://github.com/home-assistant/home-assistant/pull/5794.diff","patch_url":"https://github.com/home-assistant/home-assistant/pull/5794.patch","issue_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/5794","number":5794,"state":"open","locked":false,"title":"Formalize supported_features as entity property","user":{"login":"armills","id":1386547,"avatar_url":"https://avatars.githubusercontent.com/u/1386547?v=3","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":"**Description:**\r\nThis PR formalizes the current practice of supported_features into the base Entity class. This removes some of the duplication in the components that are using it, and renames the media_player implementation to match the standard.\r\n\r\nI was getting ready to extend this practice to a new component, and figured it makes more sense at this point to make it official.\r\n\r\nhome-assistant-polymer: https://github.com/home-assistant/home-assistant-polymer/pull/197","created_at":"2017-02-07T20:41:04Z","updated_at":"2017-02-07T21:28:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f0ac42630c3f7704608537c40f2aeed09f4e30db","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/5794/commits","review_comments_url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/5794/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/5794/comments","statuses_url":"https://api.github.com/repos/home-assistant/home-assistant/statuses/b07f431e7cf040896fea2f068ccb56dbf719a439","head":{"label":"armills:supported-features","ref":"supported-features","sha":"b07f431e7cf040896fea2f068ccb56dbf719a439","user":{"login":"armills","id":1386547,"avatar_url":"https://avatars.githubusercontent.com/u/1386547?v=3","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},"repo":{"id":60287084,"name":"home-assistant","full_name":"armills/home-assistant","owner":{"login":"armills","id":1386547,"avatar_url":"https://avatars.githubusercontent.com/u/1386547?v=3","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},"private":false,"html_url":"https://github.com/armills/home-assistant","description":":house_with_garden: Open-source home automation platform running on Python 3","fork":true,"url":"https://api.github.com/repos/armills/home-assistant","forks_url":"https://api.github.com/repos/armills/home-assistant/forks","keys_url":"https://api.github.com/repos/armills/home-assistant/keys{/key_id}","collaborators_url":"https://api.github.com/repos/armills/home-assistant/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/armills/home-assistant/teams","hooks_url":"https://api.github.com/repos/armills/home-assistant/hooks","issue_events_url":"https://api.github.com/repos/armills/home-assistant/issues/events{/number}","events_url":"https://api.github.com/repos/armills/home-assistant/events","assignees_url":"https://api.github.com/repos/armills/home-assistant/assignees{/user}","branches_url":"https://api.github.com/repos/armills/home-assistant/branches{/branch}","tags_url":"https://api.github.com/repos/armills/home-assistant/tags","blobs_url":"https://api.github.com/repos/armills/home-assistant/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/armills/home-assistant/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/armills/home-assistant/git/refs{/sha}","trees_url":"https://api.github.com/repos/armills/home-assistant/git/trees{/sha}","statuses_url":"https://api.github.com/repos/armills/home-assistant/statuses/{sha}","languages_url":"https://api.github.com/repos/armills/home-assistant/languages","stargazers_url":"https://api.github.com/repos/armills/home-assistant/stargazers","contributors_url":"https://api.github.com/repos/armills/home-assistant/contributors","subscribers_url":"https://api.github.com/repos/armills/home-assistant/subscribers","subscription_url":"https://api.github.com/repos/armills/home-assistant/subscription","commits_url":"https://api.github.com/repos/armills/home-assistant/commits{/sha}","git_commits_url":"https://api.github.com/repos/armills/home-assistant/git/commits{/sha}","comments_url":"https://api.github.com/repos/armills/home-assistant/comments{/number}","issue_comment_url":"https://api.github.com/repos/armills/home-assistant/issues/comments{/number}","contents_url":"https://api.github.com/repos/armills/home-assistant/contents/{+path}","compare_url":"https://api.github.com/repos/armills/home-assistant/compare/{base}...{head}","merges_url":"https://api.github.com/repos/armills/home-assistant/merges","archive_url":"https://api.github.com/repos/armills/home-assistant/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/armills/home-assistant/downloads","issues_url":"https://api.github.com/repos/armills/home-assistant/issues{/number}","pulls_url":"https://api.github.com/repos/armills/home-assistant/pulls{/number}","milestones_url":"https://api.github.com/repos/armills/home-assistant/milestones{/number}","notifications_url":"https://api.github.com/repos/armills/home-assistant/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/armills/home-assistant/labels{/name}","releases_url":"https://api.github.com/repos/armills/home-assistant/releases{/id}","deployments_url":"https://api.github.com/repos/armills/home-assistant/deployments","created_at":"2016-06-02T18:17:19Z","updated_at":"2016-06-02T18:17:21Z","pushed_at":"2017-02-07T20:26:23Z","git_url":"git://github.com/armills/home-assistant.git","ssh_url":"git@github.com:armills/home-assistant.git","clone_url":"https://github.com/armills/home-assistant.git","svn_url":"https://github.com/armills/home-assistant","homepage":"https://home-assistant.io","size":89583,"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":"45a7c27280e5349218b498d7b2697c953d46ab6b","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":"2017-02-07T21:03:45Z","pushed_at":"2017-02-07T21:22:58Z","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":50077,"stargazers_count":5754,"watchers_count":5754,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1612,"mirror_url":null,"open_issues_count":406,"forks":1612,"open_issues":406,"watchers":5754,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/home-assistant/home-assistant/pulls/5794"},"html":{"href":"https://github.com/home-assistant/home-assistant/pull/5794"},"issue":{"href":"https://api.github.com/repos/home-assistant/home-assistant/issues/5794"},"comments":{"href":"https://api.github.com/repos/home-assistant/home-assistant/issues/5794/comments"},"review_comments":{"href":"https://api.github.com/repos/home-assistant/home-assistant/pulls/5794/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/5794/commits"},"statuses":{"href":"https://api.github.com/repos/home-assistant/home-assistant/statuses/b07f431e7cf040896fea2f068ccb56dbf719a439"}}}}
{"actor":{"display_login":"armills"}}