Description
Camera defined three states [STATE_RECORDING, STATE_STREAMING, STATE_IDLE]
, but don't have services to allow user change state.
Proposed Solution:
Add 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
Alternative Solution:
Add generic turn_on
turn_off
service to Camera.
- turn_on has
entity_id
andstate
mode
as parameter (MODE_RECORDING
orMODE_STREAMING
) - turn_off only has
entity_id
Approved Solution:
- Adds
supported_feature
support modeled after the light component. Limit to onlyturn_on/turn_off
as a feature. - Add service to turn on/off a camera entity (also modeled after how light component does services)
- Update the demo component to support turn on/off. Do not include other platforms in this PR.