This is the error in logs when I check configuration:
Invalid config for [automation]: Expected a dictionary @ data[‘condition’][0]. Got None extra keys not allowed @ data[‘value_template’]. Got None. (See /config/configuration.yaml, line 9).
Invalid config for [automation]: Expected a dictionary @ data[‘condition’][0]. Got None extra keys not allowed @ data[‘at’]. Got None. (See /config/configuration.yaml, line 9).
Can anyone please advise on where my automation has gone wrong?
Thanks Tom. However, that now results in the below:
Invalid config for [automation]: Expected a dictionary @ data[‘condition’][0]. Got None extra keys not allowed @ data[‘value_template’]. Got None. (See /config/configuration.yaml, line 9).
Please consider marking my post above with the Solution tag. It will automatically place a check-mark next to the topic’s title which signals to other users that this topic is resolved. This helps other users find answers to similar questions.
For more information, refer to guideline 21 in the FAQ.
I’m resurrecting this thread because I have encountered an issue.
I have slightly altered the template in this automation since the above post but, my issue is not with that…I don’t think.
I have tested the automation by running it via Settings and the notification reaches my phone, as expected so I’m guessing the action part of the automation is correct.
However, the automation doesn’t run automatically so I’m assuming the issue is with the trigger or condition. There are no errors logged when it fails to run automatically.
Can anyone please advise where the below may be going wrong?
id: blue_recycling_notification
mode: single
trigger:
- platform: time
at: '15:30:00'
condition:
- condition: state
entity_id: sensor.blue
state: "Tomorrow"
action:
- service: notify.mobile_app_martins_iphone
data:
message: Recycling Reminder! BLUE bin
data:
image: /local/blue_bin.png
I don’t see any syntax errors in your example. It triggers at 15:30, if the state value of sensor.blue is “Tomorrow” it sends your phone a notification. I doubt there’s a problem with the Time Trigger so I would focus your attention on the result produced by the State Condition.
Thanks for that info…I didn’t even know that trace existed.
On checking it, it shows: Stopped because a condition failed at July 13, 2022 at 3:51:00 PM (runtime: 0.01 seconds)
As there was only one condition it was easy to check and I found I just needed to change the initial letter in “Tomorrow” to lower case. I’ve just tested it and it works now.