At this moment i have 2 security camera’s that both upload a snapshot when motion is detected. This all works fine, however i have an issue with the local file use within cards and updating them.
My camera config
platform: local_file
name: IP Camera oprit (still image)
file_path: /config/www/dahua/3H03C08PAA00138/dummy_ip_camera_oprit.png
platform: local_file
name: IP Camera tuin (still image)
file_path: /config/www/escam/dummy_ip_camera_tuin.png
After a reboot both camera’s have the correct “dummy” image but when the automation is triggered something goes wrong.
The automation i’m using
- alias: IP camera oprit | Update camerabeeld bij beweging
trigger:
platform: event
event_type: folder_watcher
event_data:
event_type: created
condition:
condition: template
value_template: "{{ 'dahua' in trigger.event.data.path }}"
action:
- service: camera.local_file_update_file_path
entity_id: camera.dummy_ip_camera_oprit
data_template:
file_path: '{{ trigger.event.data.path }}'
- alias: IP camera tuin | Update camerabeeld bij beweging
trigger:
platform: event
event_type: folder_watcher
event_data:
event_type: created
condition:
condition: template
value_template: "{{ 'escam' in trigger.event.data.path }}"
action:
- service: camera.local_file_update_file_path
entity_id: camera.dummy_ip_camera_tuin
data_template:
file_path: '{{ trigger.event.data.path }}'
The thing is that when motion is triggered and the IP camera uploads it’s image the change allways ends up in the first card (see screenshot) so screenshot’s from “Tuin” end up in the “Oprit” card.
Anyone has a suggestion about what i’m doing wrong here?