Add camera example. (#9521)

* Add camera example.

* ✏️ Tweak

* ✏️ Tweak

* Needs raw
This commit is contained in:
jeff-h 2019-05-29 20:25:59 +12:00 committed by Fabian Affolter
parent 110d939767
commit ff5ce7bfec

View File

@ -132,3 +132,21 @@ state_image:
"on": /local/bed_light_on.png
"off": /local/bed_light_off.png
```
Displaying a live feed from an FFMPEG camera:
{% raw %}
```yaml
type: picture-entity
entity: camera.backdoor
camera_view: live
tap_action:
action: call-service
service: camera.snapshot
service_data:
entity_id: camera.backdoor
filename: '/shared/backdoor-{{ now().strftime("%Y-%m-%d-%H%M%S") }}.jpg'
```
{% endraw %}
The filename needs to be a path that is writable by Home Assistant in your system. You may need to configure `whitelist_external_dirs` ([documentation](https://www.home-assistant.io/docs/configuration/basic/)).