I’m making a lovelace view with my CCTV camera and adding a button for making a snapshot and making a recording.
I seem to have a problem using call-service.
My code:
type: vertical-stack
cards:
- type: picture-entity
entity: camera.vmsynds3617xs01_achter_terras
camera_image: camera.vmsynds3617xs01_achter_terras
camera_view: live
- type: horizontal-stack
cards:
- type: button
tap_action:
action: call-service
service: camera.snapshot
data:
entity_id: camera.vmsynds3617xs01_achter_terras
filename: /tmp/test.jpg
entity: camera.vmsynds3617xs01_achter_terras
icon: 'hass:image'
name: Take snapshot
icon_height: 50px
hold_action:
action: none
- type: button
tap_action:
action: call-service
service: camera.record
data:
entity_id: camera.vmsynds3617xs01_achter_terras
filename: /tmp/test.mp4
lookback: 5
duration: 60
entity: camera.vmsynds3617xs01_achter_terras
name: Make recording
icon_height: 50px
- type: button
tap_action:
action: more-info
entity: binary_sensor.lumi_lumi_sensor_motion_aq2_ias_zone
icon_height: 50px
show_name: true
name: Motion detected
icon: 'hass:walk'
hold_action:
action: none
The error i get:
Failed to call service camera/snapshot. required key not provided @ data[‘filename’]
I have filename configured in data below the service. Am I not writing it correctly?