{"action":"created","issue":{"url":"https://api.github.com/repos/home-assistant/architecture/issues/35","repository_url":"https://api.github.com/repos/home-assistant/architecture","labels_url":"https://api.github.com/repos/home-assistant/architecture/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/home-assistant/architecture/issues/35/comments","events_url":"https://api.github.com/repos/home-assistant/architecture/issues/35/events","html_url":"https://github.com/home-assistant/architecture/issues/35","id":330969244,"node_id":"MDU6SXNzdWUzMzA5NjkyNDQ=","number":35,"title":"RFC: Add set_state service to Camera","user":{"login":"awarecan","id":7366491,"node_id":"MDQ6VXNlcjczNjY0OTE=","avatar_url":"https://avatars1.githubusercontent.com/u/7366491?v=4","gravatar_id":"","url":"https://api.github.com/users/awarecan","html_url":"https://github.com/awarecan","followers_url":"https://api.github.com/users/awarecan/followers","following_url":"https://api.github.com/users/awarecan/following{/other_user}","gists_url":"https://api.github.com/users/awarecan/gists{/gist_id}","starred_url":"https://api.github.com/users/awarecan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awarecan/subscriptions","organizations_url":"https://api.github.com/users/awarecan/orgs","repos_url":"https://api.github.com/users/awarecan/repos","events_url":"https://api.github.com/users/awarecan/events{/privacy}","received_events_url":"https://api.github.com/users/awarecan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":29,"created_at":"2018-06-10T13:37:12Z","updated_at":"2018-06-16T00:00:42Z","closed_at":null,"author_association":"NONE","body":"Camera defined three states `[STATE_RECORDING, STATE_STREAMING, STATE_IDLE]`, but don't have services to allow user change state.\r\n\r\n## Proposed Solution:\r\nAdd abstract ~`set_state`~ `set_mode` service to Camera, take `entity_id` and ~`state`~ `mode` as parameter. Using different mode const to clarify that *shall not* directly set state machine, `[MODE_RECORDING, MODE_STREAMING, MODE_IDLE]`. Each platform should have its own implementation\r\n\r\n## Alternative Solution:\r\nAdd generic `turn_on` `turn_off` service to Camera.\r\n- turn_on has `entity_id` and ~`state`~ `mode`  as parameter (`MODE_RECORDING` or `MODE_STREAMING`)\r\n- turn_off only has `entity_id`\r\n\r\n## Approved Solution:\r\n- Adds `supported_feature` support modeled after the light component. Limit to only `turn_on/turn_off` as a feature.\r\n- Add service to turn on/off a camera entity (also modeled after how light component does services)\r\n- Update the demo component to support turn on/off. *Do not include other platforms in this PR.*"},"comment":{"url":"https://api.github.com/repos/home-assistant/architecture/issues/comments/397770003","html_url":"https://github.com/home-assistant/architecture/issues/35#issuecomment-397770003","issue_url":"https://api.github.com/repos/home-assistant/architecture/issues/35","id":397770003,"node_id":"MDEyOklzc3VlQ29tbWVudDM5Nzc3MDAwMw==","user":{"login":"awarecan","id":7366491,"node_id":"MDQ6VXNlcjczNjY0OTE=","avatar_url":"https://avatars1.githubusercontent.com/u/7366491?v=4","gravatar_id":"","url":"https://api.github.com/users/awarecan","html_url":"https://github.com/awarecan","followers_url":"https://api.github.com/users/awarecan/followers","following_url":"https://api.github.com/users/awarecan/following{/other_user}","gists_url":"https://api.github.com/users/awarecan/gists{/gist_id}","starred_url":"https://api.github.com/users/awarecan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awarecan/subscriptions","organizations_url":"https://api.github.com/users/awarecan/orgs","repos_url":"https://api.github.com/users/awarecan/repos","events_url":"https://api.github.com/users/awarecan/events{/privacy}","received_events_url":"https://api.github.com/users/awarecan/received_events","type":"User","site_admin":false},"created_at":"2018-06-16T00:00:41Z","updated_at":"2018-06-16T00:00:41Z","author_association":"NONE","body":"I will keep that simple, not change base to ToggleEntity, since not all Camera model support that on/off feature. Base from ToggleEntity means it suppose to have this feature.\r\n\r\n@balloob Is there a way to filter \"unsupported\" entity out the entities dropdown list in Service page? I just notice that my nest camera listed under `camera.enable_motion_detection` service which doesn't support. If I click `call service`, nothing show up in the UI, no success or failed notification. Only a ERROR log appears says `NotImplementedError`"}}
{"actor":{"display_login":"awarecan"}}