This just appeared. I have not changed anything in my config.
Invalid config for [sensor]: required key not provided @ data[‘platform’]. Got None. (See /config/configuration.yaml, line 21.
I have nothing on line 21.
The next line is 22 which is sensor: !include sensors.yaml
If I remove the include sensors.yaml the error goes away.
I meant to say no changes in my configuration.yaml.
I didn’t Realise adding something in my sensors yaml would give me an error configuration.yaml.
I am on a learning process with HA but thanks anyway
Your sensors.yaml is effectively part of your configuration.yaml file because within your configuration.yaml you have this statement:
sensor: !include sensors.yaml
What that means is that when Home Assistant processes the YAML in configuration.yaml it will get everything related to the sensor domain from the sensors.yaml file.
All this to say that configuration errors are typically caused by invalid changes made to Home Assistant’s configuration (which may be defined in one or more files).
The way that includes are processed is that once the configuration.yaml is parsed it adds the included sections into the configuration just as if the included file information was added directly to the configuration.yaml itself at the point where the !include is placed.
That’s why line numbers are sometimes not correct. It depends on how the yaml parser sees the included code.
And it makes it even more confusing since the parser will ignore some content on some lines but not others. And it will sometimes even recognize the actual included file and reference the line numbers in that file itself (not the configuration.yaml file line numbers).
So, bottom line is that, yes, any configuration change anywhere in your config directory could end up throwing an error with a “configuration.yaml” line number as a reference even if the change wasn’t made there but in an included file.
So the line references can help but don’t take them as definitive clues as to where to look.