Hi all,
I’ve been trying to google how to do this and I thought I got it right but apparently didn’t.
What I want to do:
Get a notification on my phone when someone is detected at the door and include a still from my reolink camera.
What I did so far:
Found a way to send a jpg file to the home assistant file system using FTP. This bit is working fine, I can see the file gets updated anytime I walk by the camera
Created an automation in home assistant sending a notification to my phone anytime the the human detection turns on on the reolink camera. This bit works fine as well, I can get a standard notification telling me someone is at the door.
I however cannot get the jpg file to display in the notification. In the traces from my automation, I get the following error:
Stopped because an error was encountered at September 15, 2023 at 11:15:41 PM (runtime: 0.01 seconds)
extra keys not allowed @ data[‘attachment’]
This is the full yaml automation
alias: Front Porch - Human detection notification
description: Sends notification to phone if someone is detected at the door
trigger:
- type: turned_on
platform: device
device_id: 092524197ea1fcdbc21a116f6cf7886d
entity_id: 99abd7ebd2ee2ddeea766132c19e732b
domain: binary_sensor
condition: []
action:
- service: notify.mobile_app_pixel
data:
message: Someone is at the door
data:
attachment:
url: /media/reolink/2023/09/FrontPorch.jpg
content-type: JPEG
hide-thumbnail: false
mode: single
What am I doing wrong?