Automation.yaml invalid config

Hello,

Need some help here, this script was working until I updated yesterday to the latest version of Home Assistant. I cant remember what version I was on before but I am currently on the latest version.

Now on the front page of my home assistant it says my automation file is wrong. The selection that I know is alerting is the section I have highlighted in the image below. I know the rest is correct as if I remove the highlighted line the configuration error box on the home assistant front page goes away.

Can any one help? Ive used a YAML checker and it says its correct.

Have you tried hass --script check_config ?
And read this https://home-assistant.io/getting-started/troubleshooting-configuration/

Thanks for the quick reply,

Sorry to sound stupid but where do I type or use the hass --script check_config line?

Same as doing the update apart from the 3rd command

sudo su -s /bin/bash homeassistant
source /srv/homeassistant/bin/activate
hass --script check_config

use exit to get out of the virtual environment

Ok, ive done that.

Im new to this so the output isnt really meaningful to me? Can someone guide me as to what is wrong with the configuration?

Again this all worked before I upgraded my home assistant version so not sure why its now saying the config is wrong.

Attached is the output of hass --script check_config

output.yaml (4.9 KB)

Here is my automation file - automation.yaml (1.7 KB)

Have you tried to understand the output of the check_config script?
Because it says where the your mistake is.

[platform] is an invalid option for [automation]. Check: automation->condition->0->platform

You’ve got:

    condition:
      platform: state

As per the documentation, you don’t use platform there, you’d use condition: state instead - as you’ve done earlier in the same file :wink:

Ah that solved it :slight_smile:

Interesting that that used to work before and ive made no changes to it. Only since updating to the latest HA version its flagged it as an issue.

Thanks again