I did some automations editing via hassio Automation GUI on a couple of existing automations tonight and now get this error message when validating. Trouble is it not helpful and the automations seem to be present and working anyway.
Anyone know what a key is in this context then ?
[automation]: required key not provided @ data[‘trigger’][3][‘platform’]. Got None. (See /config/configuration.yaml, line 331). Please check the docs at https://home-assistant.io/components/automation/
line 331 of configuration.yaml is the groups include, group: !include groups.yaml, which is also not very helpful to me.
this doesn’t appear to be related to automation but to groups, used either in automations or display.
Can you share the actual lines around line 331 of your config? (say lines 325 to 335)
Can you also share your groups.yaml
You are missing the word “platform” in one of your automation triggers. I’m guessing your spacing is wrong for a key that is not inside the previous platform. Do you have any automations that have 3 triggers inside them?
Thanks for both leads guys.
The stuff around line 331 is the other yaml includes below it, and above it some unrelated MQTT sensors (which have not been edited lately).
petro does this look like what you describe ?
Just now checked my automations line by line paying careful attention to platform and triggers.
- id: '1527401956219'
alias: Notify Home Rain since 9AM
trigger:
- at: 08:59:00
platform: time
- at: '12:00:00'
platform: time
- at: '15:00:00'
platform: time
- at: '18:00:00'
pl condition:
- above: '0'
condition: numeric_state
entity_id: sensor.rain
action:
- data:
message: 'Rain gauge {{ states(''sensor.rain'') }} mm since 9AM '
target:
- device/Galaxy S4
title: Home Rain Gauge Report
service: notify.martins_notifications
Just as i thought, you have some goofyness after your 3rd trigger. Your condition is incorrectly formatted.
- id: '1527401956219'
alias: Notify Home Rain since 9AM
trigger:
- at: 08:59:00
platform: time
- at: '12:00:00'
platform: time
- at: '15:00:00'
platform: time
- at: '18:00:00'
platform: time
condition:
- above: '0'
condition: numeric_state
entity_id: sensor.rain
action:
- data:
message: 'Rain gauge {{ states(''sensor.rain'') }} mm since 9AM '
target:
- device/Galaxy S4
title: Home Rain Gauge Report
service: notify.martins_notifications
EDIT: I’m guessing you copied and pasted into the field or the field ran out of room. Either way, you were missing the full word ‘platform’ in your 4th trigger which messed up your condition format.
OK, correcting the platform and condition lines fixes the validation and error message. Thanks all. Well done petro, very good description of what I needed to look for. Not sure how the code got messed up, but I’ll be more careful to backup the yamls before tinkering, I usually do but did not this time.
The above: ‘0’ seems to be no issue, and is just how ha gui page in the Configuration Tab writes the code for me. I don’t direct edit the yamls at all if I can avoid it (seems like a very last century method to me anyway
The 0 actually refers to 0 measured rain in mm. For values of 0 I do not want to be messaged…