#extra keys not allowed error in yaml

1 messages · Page 1 of 1 (latest)

white notch
#

I am getting the following error when trying to save an automation:

Message malformed: extra keys not allowed @ data['binary_sensor']
I confess to not knowing the correct syntax when using and am a bit confused regarding when to use double braces, single braces, etc when defining the state. in the following yaml:

'''
mode: single
alias: this is the name
description: sss
triggers:
trigger: event
event_type: imap_content
id: custom_event
binary_sensor:
- name: mail_delivered two
auto_off: "08:00:00"
state: >-
{ {% set current = this.state|default('off', 1) %} {% if 'Mail Was
Delivered' in trigger.event.data["subject"] %}
on }
{% else %}
{ current }
{% endif %} }
actions:
action: input_boolean.turn_on
target:
entity_id: input_boolean.mail_delivered
'''

Thanks in advance for assistance!

#

extra keys not allowed error in yaml

buoyant tide
#

That's not really an automation, looks like you've got half of a template sensor inserted into there where it doesn't belong.

white notch
#

Ok, moving to the template section. Though I am building it in the automation section.