{"action":"created","comment":{"url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/comments/170737405","pull_request_review_id":99469137,"id":170737405,"diff_hunk":"@@ -38,6 +38,7 @@\n     vol.Required(CONF_URL): cv.template,\n     vol.Optional(CONF_METHOD, default=DEFAULT_METHOD):\n         vol.All(vol.Lower, vol.In(SUPPORT_REST_METHODS)),\n+    vol.Optional(CONF_HEADERS): {cv.string: cv.string},","path":"homeassistant/components/rest_command.py","position":13,"original_position":13,"commit_id":"3bfe5fd51de6ba2fc1cdfe354d84dbe64003396d","original_commit_id":"3bfe5fd51de6ba2fc1cdfe354d84dbe64003396d","user":{"login":"kellerza","id":6756881,"avatar_url":"https://avatars3.githubusercontent.com/u/6756881?v=4","gravatar_id":"","url":"https://api.github.com/users/kellerza","html_url":"https://github.com/kellerza","followers_url":"https://api.github.com/users/kellerza/followers","following_url":"https://api.github.com/users/kellerza/following{/other_user}","gists_url":"https://api.github.com/users/kellerza/gists{/gist_id}","starred_url":"https://api.github.com/users/kellerza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kellerza/subscriptions","organizations_url":"https://api.github.com/users/kellerza/orgs","repos_url":"https://api.github.com/users/kellerza/repos","events_url":"https://api.github.com/users/kellerza/events{/privacy}","received_events_url":"https://api.github.com/users/kellerza/received_events","type":"User","site_admin":false},"body":"This might have to be \r\n```\r\nvol.Optional(CONF_HEADERS): vol.Schema({cv.string: cv.string})\r\n```","created_at":"2018-02-26T21:12:55Z","updated_at":"2018-02-26T21:13:05Z","html_url":"https://github.com/home-assistant/home-assistant/pull/12646#discussion_r170737405","pull_request_url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/12646","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/home-assistant/home-assistant/pulls/comments/170737405"},"html":{"href":"https://github.com/home-assistant/home-assistant/pull/12646#discussion_r170737405"},"pull_request":{"href":"https://api.github.com/repos/home-assistant/home-assistant/pulls/12646"}}},"pull_request":{"url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/12646","id":171199148,"html_url":"https://github.com/home-assistant/home-assistant/pull/12646","diff_url":"https://github.com/home-assistant/home-assistant/pull/12646.diff","patch_url":"https://github.com/home-assistant/home-assistant/pull/12646.patch","issue_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/12646","number":12646,"state":"open","locked":false,"title":"Add support for specifying custom headers for rest_command","user":{"login":"doctorjames","id":317443,"avatar_url":"https://avatars3.githubusercontent.com/u/317443?v=4","gravatar_id":"","url":"https://api.github.com/users/doctorjames","html_url":"https://github.com/doctorjames","followers_url":"https://api.github.com/users/doctorjames/followers","following_url":"https://api.github.com/users/doctorjames/following{/other_user}","gists_url":"https://api.github.com/users/doctorjames/gists{/gist_id}","starred_url":"https://api.github.com/users/doctorjames/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doctorjames/subscriptions","organizations_url":"https://api.github.com/users/doctorjames/orgs","repos_url":"https://api.github.com/users/doctorjames/repos","events_url":"https://api.github.com/users/doctorjames/events{/privacy}","received_events_url":"https://api.github.com/users/doctorjames/received_events","type":"User","site_admin":false},"body":"## Description:\r\n\r\nAdd support for passing custom headers for rest_command similar to rest sensor.\r\n\r\n**Pull request in [home-assistant.github.io](https://github.com/home-assistant/home-assistant.github.io) with documentation:** home-assistant/home-assistant.github.io#4747\r\n\r\n## Example entry for `configuration.yaml`:\r\n```yaml\r\n  turn_off_sony_television:\r\n    url: 'http://192.168.1.100/IRCC'\r\n    method: post\r\n    headers:\r\n      X-CERS-DEVICE-ID: abcdef\r\n    payload: '<?xml version=\"1.0\" encoding=\"utf-8\"?><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"><s:Body><u:X_SendIRCC xmlns:u=\"urn:schemas-sony-com:service:IRCC:1\"><IRCCCode>AAAAAQAAAAEAAAAvAw==</IRCCCode></u:X_SendIRCC></s:Body></s:Envelope>'\r\n```\r\n\r\n## Checklist:\r\n  - [x] The code change is tested and works locally.\r\n  - [x] Documentation added/updated in [home-assistant.github.io](https://github.com/home-assistant/home-assistant.github.io)\r\n  - [x] Local tests with `tox` run successfully.\r\n  - [x] Tests have been added to verify that the new code works.","created_at":"2018-02-24T21:44:20Z","updated_at":"2018-02-26T21:13:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"994c6630b2139127ec743a5449a23589dfed4861","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":527871105,"url":"https://api.github.com/repos/home-assistant/home-assistant/labels/cla-signed","name":"cla-signed","color":"008000","default":false},{"id":564641969,"url":"https://api.github.com/repos/home-assistant/home-assistant/labels/component:%20rest_command","name":"component: rest_command","color":"ededed","default":false},{"id":832964196,"url":"https://api.github.com/repos/home-assistant/home-assistant/labels/small-pr","name":"small-pr","color":"e5bd7e","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/12646/commits","review_comments_url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/12646/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/12646/comments","statuses_url":"https://api.github.com/repos/home-assistant/home-assistant/statuses/3bfe5fd51de6ba2fc1cdfe354d84dbe64003396d","head":{"label":"doctorjames:dev","ref":"dev","sha":"3bfe5fd51de6ba2fc1cdfe354d84dbe64003396d","user":{"login":"doctorjames","id":317443,"avatar_url":"https://avatars3.githubusercontent.com/u/317443?v=4","gravatar_id":"","url":"https://api.github.com/users/doctorjames","html_url":"https://github.com/doctorjames","followers_url":"https://api.github.com/users/doctorjames/followers","following_url":"https://api.github.com/users/doctorjames/following{/other_user}","gists_url":"https://api.github.com/users/doctorjames/gists{/gist_id}","starred_url":"https://api.github.com/users/doctorjames/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doctorjames/subscriptions","organizations_url":"https://api.github.com/users/doctorjames/orgs","repos_url":"https://api.github.com/users/doctorjames/repos","events_url":"https://api.github.com/users/doctorjames/events{/privacy}","received_events_url":"https://api.github.com/users/doctorjames/received_events","type":"User","site_admin":false},"repo":{"id":96548933,"name":"home-assistant","full_name":"doctorjames/home-assistant","owner":{"login":"doctorjames","id":317443,"avatar_url":"https://avatars3.githubusercontent.com/u/317443?v=4","gravatar_id":"","url":"https://api.github.com/users/doctorjames","html_url":"https://github.com/doctorjames","followers_url":"https://api.github.com/users/doctorjames/followers","following_url":"https://api.github.com/users/doctorjames/following{/other_user}","gists_url":"https://api.github.com/users/doctorjames/gists{/gist_id}","starred_url":"https://api.github.com/users/doctorjames/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doctorjames/subscriptions","organizations_url":"https://api.github.com/users/doctorjames/orgs","repos_url":"https://api.github.com/users/doctorjames/repos","events_url":"https://api.github.com/users/doctorjames/events{/privacy}","received_events_url":"https://api.github.com/users/doctorjames/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/doctorjames/home-assistant","description":":house_with_garden: Open-source home automation platform running on Python 3","fork":true,"url":"https://api.github.com/repos/doctorjames/home-assistant","forks_url":"https://api.github.com/repos/doctorjames/home-assistant/forks","keys_url":"https://api.github.com/repos/doctorjames/home-assistant/keys{/key_id}","collaborators_url":"https://api.github.com/repos/doctorjames/home-assistant/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/doctorjames/home-assistant/teams","hooks_url":"https://api.github.com/repos/doctorjames/home-assistant/hooks","issue_events_url":"https://api.github.com/repos/doctorjames/home-assistant/issues/events{/number}","events_url":"https://api.github.com/repos/doctorjames/home-assistant/events","assignees_url":"https://api.github.com/repos/doctorjames/home-assistant/assignees{/user}","branches_url":"https://api.github.com/repos/doctorjames/home-assistant/branches{/branch}","tags_url":"https://api.github.com/repos/doctorjames/home-assistant/tags","blobs_url":"https://api.github.com/repos/doctorjames/home-assistant/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/doctorjames/home-assistant/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/doctorjames/home-assistant/git/refs{/sha}","trees_url":"https://api.github.com/repos/doctorjames/home-assistant/git/trees{/sha}","statuses_url":"https://api.github.com/repos/doctorjames/home-assistant/statuses/{sha}","languages_url":"https://api.github.com/repos/doctorjames/home-assistant/languages","stargazers_url":"https://api.github.com/repos/doctorjames/home-assistant/stargazers","contributors_url":"https://api.github.com/repos/doctorjames/home-assistant/contributors","subscribers_url":"https://api.github.com/repos/doctorjames/home-assistant/subscribers","subscription_url":"https://api.github.com/repos/doctorjames/home-assistant/subscription","commits_url":"https://api.github.com/repos/doctorjames/home-assistant/commits{/sha}","git_commits_url":"https://api.github.com/repos/doctorjames/home-assistant/git/commits{/sha}","comments_url":"https://api.github.com/repos/doctorjames/home-assistant/comments{/number}","issue_comment_url":"https://api.github.com/repos/doctorjames/home-assistant/issues/comments{/number}","contents_url":"https://api.github.com/repos/doctorjames/home-assistant/contents/{+path}","compare_url":"https://api.github.com/repos/doctorjames/home-assistant/compare/{base}...{head}","merges_url":"https://api.github.com/repos/doctorjames/home-assistant/merges","archive_url":"https://api.github.com/repos/doctorjames/home-assistant/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/doctorjames/home-assistant/downloads","issues_url":"https://api.github.com/repos/doctorjames/home-assistant/issues{/number}","pulls_url":"https://api.github.com/repos/doctorjames/home-assistant/pulls{/number}","milestones_url":"https://api.github.com/repos/doctorjames/home-assistant/milestones{/number}","notifications_url":"https://api.github.com/repos/doctorjames/home-assistant/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/doctorjames/home-assistant/labels{/name}","releases_url":"https://api.github.com/repos/doctorjames/home-assistant/releases{/id}","deployments_url":"https://api.github.com/repos/doctorjames/home-assistant/deployments","created_at":"2017-07-07T14:56:06Z","updated_at":"2017-07-07T14:56:14Z","pushed_at":"2018-02-26T19:53:09Z","git_url":"git://github.com/doctorjames/home-assistant.git","ssh_url":"git@github.com:doctorjames/home-assistant.git","clone_url":"https://github.com/doctorjames/home-assistant.git","svn_url":"https://github.com/doctorjames/home-assistant","homepage":"https://home-assistant.io","size":78813,"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,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"home-assistant:dev","ref":"dev","sha":"6d431c3fc3f6a8c9bf73c73396ddd0c47dd7aeff","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":"2018-02-26T19:30:43Z","pushed_at":"2018-02-26T21:12:48Z","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":79043,"stargazers_count":12815,"watchers_count":12815,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3697,"mirror_url":null,"archived":false,"open_issues_count":873,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":3697,"open_issues":873,"watchers":12815,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/home-assistant/home-assistant/pulls/12646"},"html":{"href":"https://github.com/home-assistant/home-assistant/pull/12646"},"issue":{"href":"https://api.github.com/repos/home-assistant/home-assistant/issues/12646"},"comments":{"href":"https://api.github.com/repos/home-assistant/home-assistant/issues/12646/comments"},"review_comments":{"href":"https://api.github.com/repos/home-assistant/home-assistant/pulls/12646/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/12646/commits"},"statuses":{"href":"https://api.github.com/repos/home-assistant/home-assistant/statuses/3bfe5fd51de6ba2fc1cdfe354d84dbe64003396d"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"kellerza"}}