Invalid config for [automation] line22

I have something wrong in my automations
it has been there for quite sometime and dosnt seem to be effecting anything but i want to clear up any erors to help me keep thing running smoothly
i have been removing my automations 1 x 1 and moving them to node red but i still get this error

Logger: homeassistant.config
Source: config.py:443
First occurred: 9:09:15 AM (2 occurrences)
Last logged: 9:09:15 AM

Invalid config for [automation]: value must be one of ['turned_off', 'turned_on'] for dictionary value @ data['type']. Got None. (See /config/configuration.yaml, line 22).
Invalid config for [automation]: expected float for dictionary value @ data['below']. Got None. (See /config/configuration.yaml, line 22).

however there is nothing similar to this in my yaml nothing at line 22

I’d imagine line 22 of your configuration.yaml is the automation !include line, and the problem is in that file (probably automations.yaml).

i was looking at that and that line 22 is include groups
this is line 21 to 29

#include files
#group: !include groups.yaml
automation: !include automations.yaml
sensor: !include sensor.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
template: !include template.yaml
frontend:
themes: !include themes.yaml

It’s probably ignoring / miscounting the lines. What’s in automations.yaml, and was that all created via the UI, or with manual YAML?

It should be all UI but i might have amended some previous errors manualy in yaml.
it would make sence that the error is in automations, but how do i find what automation is the problem

The error message should narrow it down to lines containing type and below. If you paste the whole file here I’m sure someone (perhaps me) will identify the issue.

That’s used in a Device Action or Device Condition so there’s another clue for where to look.

Solved. there was a orphened automation in my config, after removing all my UI automations there was an old automation that must not have got deleted when i had deleted the automation from the UI