{"action":"created","issue":{"url":"https://api.github.com/repos/home-assistant/home-assistant/issues/2766","repository_url":"https://api.github.com/repos/home-assistant/home-assistant","labels_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/2766/labels{/name}","comments_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/2766/comments","events_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/2766/events","html_url":"https://github.com/home-assistant/home-assistant/pull/2766","id":170100979,"number":2766,"title":"add changed_by attribute to lock","user":{"login":"persandstrom","id":1887485,"avatar_url":"https://avatars.githubusercontent.com/u/1887485?v=3","gravatar_id":"","url":"https://api.github.com/users/persandstrom","html_url":"https://github.com/persandstrom","followers_url":"https://api.github.com/users/persandstrom/followers","following_url":"https://api.github.com/users/persandstrom/following{/other_user}","gists_url":"https://api.github.com/users/persandstrom/gists{/gist_id}","starred_url":"https://api.github.com/users/persandstrom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/persandstrom/subscriptions","organizations_url":"https://api.github.com/users/persandstrom/orgs","repos_url":"https://api.github.com/users/persandstrom/repos","events_url":"https://api.github.com/users/persandstrom/events{/privacy}","received_events_url":"https://api.github.com/users/persandstrom/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-09T07:38:42Z","updated_at":"2016-08-09T19:26:44Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/home-assistant/home-assistant/pulls/2766","html_url":"https://github.com/home-assistant/home-assistant/pull/2766","diff_url":"https://github.com/home-assistant/home-assistant/pull/2766.diff","patch_url":"https://github.com/home-assistant/home-assistant/pull/2766.patch"},"body":"**Description:**\r\nAdd a changed_by attribute to lock component in order to be able to take different actions depending on who unlocked/locked\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\nautomation:\r\n  - alias: Lock status changed\r\n    trigger:\r\n      - platform: state\r\n        entity_id: lock.lock_1\r\n    action:\r\n      - service: notify.notify\r\n        data_template:\r\n          message: >\r\n            Lock changed from {{ trigger.from_state.state }}\r\n            to {{ trigger.to_state.state }}\r\n            by {{ trigger.to_state.attributes.changed_by }}\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.io](https://github.com/home-assistant/home-assistant.io)\r\n\r\nIf code communicates with devices, web services, or a:\r\n  - [ ] Local tests with `tox` run successfully. **Your PR cannot be merged unless tests pass**\r\n"},"comment":{"url":"https://api.github.com/repos/home-assistant/home-assistant/issues/comments/238663423","html_url":"https://github.com/home-assistant/home-assistant/pull/2766#issuecomment-238663423","issue_url":"https://api.github.com/repos/home-assistant/home-assistant/issues/2766","id":238663423,"user":{"login":"turbokongen","id":16622752,"avatar_url":"https://avatars.githubusercontent.com/u/16622752?v=3","gravatar_id":"","url":"https://api.github.com/users/turbokongen","html_url":"https://github.com/turbokongen","followers_url":"https://api.github.com/users/turbokongen/followers","following_url":"https://api.github.com/users/turbokongen/following{/other_user}","gists_url":"https://api.github.com/users/turbokongen/gists{/gist_id}","starred_url":"https://api.github.com/users/turbokongen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/turbokongen/subscriptions","organizations_url":"https://api.github.com/users/turbokongen/orgs","repos_url":"https://api.github.com/users/turbokongen/repos","events_url":"https://api.github.com/users/turbokongen/events{/privacy}","received_events_url":"https://api.github.com/users/turbokongen/received_events","type":"User","site_admin":false},"created_at":"2016-08-09T19:26:44Z","updated_at":"2016-08-09T19:26:44Z","body":"Works like a charm! :+1: "}}
{"actor":{"display_login":"turbokongen"}}