Ihek
(Ihek)
February 28, 2023, 4:50pm
1
Preformatted text
Hello
I need help to find out what the problem is.
I made automation to get a snapshot to my iPhone when my nest doorbellPreformatted text
is pressed.
This how it looks like:
- id: '1677360232870'
alias: Send Nest Doorbell Snapshot
description: ''
trigger:
- platform: device
device_id: ae9616dff9ab2b7e3dc9b96a4822cf62
domain: nest
type: doorbell_chime
action:
- service: camera.snapshot
data:
filename: /config/www/snapshots/doorbell.jpg
data:
attachment:
content-type: jpeg
url: https://xxx.xxx.xx.xx/local/snapshots/doorbell.jpg
target:
entity_id: camera.front_camera
- service: notify.mobile_app_ihsan_iphone_10
data:
message: Someone is at the door
data:
attachment:
content-type: jpeg
url: https://xxx.xxx.xx.xx/local/snapshots/doorbell.jpg
When I check it in developer tool, there is no problem
But in Log I get this error:
Logger: homeassistant.components.automation.send_nest_doorbell_snapshot
Source: helpers/script.py:409
Integration: Automation (documentation, issues)
First occurred: 5:35:52 PM (2 occurrences)
Last logged: 5:36:11 PM
Send Nest Doorbell Snapshot: Error executing script. Invalid data for call_service at pos 1: extra keys not allowed @ data[‘data’]
And this:
Logger: homeassistant.components.automation.send_nest_doorbell_snapshot
Source: components/automation/init .py:255
Integration: Automation (documentation, issues)
First occurred: 5:35:52 PM (2 occurrences)
Last logged: 5:36:12 PM
Error while executing automation automation.send_nest_doorbell_snapshot: extra keys not allowed @ data[‘data’]
Any help please
EdwardTFN
(Edward Firmo)
February 28, 2023, 4:53pm
2
Use this button in the top of your post editor to make your yaml looks like a code and you will make everyone’s live much easier…
Take a look at this fixed post:
Before we begin…
This forum is not a helpdesk
The people here don’t work for Home Assistant, that’s an open source project. We are volunteering our free time to help others. Not all topics may get an answer, never mind one that helps you solve your problem.
[image]
This also isn’t a general home automation forum, this is a forum for Home Assistant and things related to it. Any question about Home Assistant, and about using things with Home Assistant, is welcome here. We can’t help you with e…
1 Like
You use data key twice and the log say extra data key not allowed, maybe you forgot to intend the yaml?
Ihek
(Ihek)
February 28, 2023, 5:50pm
4
Thank you I will try this
The format for camera snapshot is here
Before we begin…
This forum is not a helpdesk
The people here don’t work for Home Assistant, that’s an open source project. We are volunteering our free time to help others. Not all topics may get an answer, never mind one that helps you solve your problem.
[image]
This also isn’t a general home automation forum, this is a forum for Home Assistant and things related to it. Any question about Home Assistant, and about using things with Home Assistant, is welcome here. We can’t help you with e…
Your corrected code should be like this
- id: '1677360232870'
alias: Send Nest Doorbell Snapshot
description: ''
trigger:
- platform: device
device_id: ae9616dff9ab2b7e3dc9b96a4822cf62
domain: nest
type: doorbell_chime
action:
- service: camera.snapshot
data:
filename: /config/www/snapshots/doorbell.jpg
target:
entity_id: camera.front_camera
- service: notify.mobile_app_ihsan_iphone_10
message: Someone is at the door
data:
attachment:
content-type: jpeg
url: https://xxx.xxx.xx.xx/local/snapshots/doorbell.jpg
It seems you have copy pasted the notification data arguments into the snapshot service call and you have added data key before message in notification call
The documentation is here