mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-08 09:56:52 +00:00
Add camera example. (#9521)
* Add camera example. * ✏️ Tweak * ✏️ Tweak * Needs raw
This commit is contained in:
parent
110d939767
commit
ff5ce7bfec
@ -132,3 +132,21 @@ state_image:
|
|||||||
"on": /local/bed_light_on.png
|
"on": /local/bed_light_on.png
|
||||||
"off": /local/bed_light_off.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/)).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user