Finding error in script

I’m using a script.yaml and an error is being thrown on startup. However, the error message points to the line in my configuration.yaml that refers to the script.yaml.

Logger: homeassistant.config
Source: config.py:464
First occurred: 06:43:57 (2 occurrences)
Last logged: 06:43:57

Invalid config for [script]: expected str for dictionary value @ data['sequence'][0]['state']. Got None. (See /config/configuration.yaml, line 44).
Invalid config for [automation]: [value] is an invalid option for [automation]. Check: automation->condition->2->value. (See /config/configuration.yaml, line 43).

This is the relevant code in my configuration.yaml

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
sensor: !include sensors.yaml
input_boolean: !include input_booleans.yaml

These are the relevant lines in the script.yaml file, but I do not see the error.

How do I trace the error in the script?

The line numbers probably refer to this:

automation: !include automations.yaml # line 43
script: !include scripts.yaml # line 44

For the automation, you are looking for an automation that has it’s third condition containing the invalid key “value”.

For the script, there is an issue with the first action in a sequence of one of your scripts.

If that is no use, you are going to have to do a binary search. Comment out half the scripts, save and see if the config check passes. You now know which half the error is in. Halve that and repeat.

Ugh! OK, if that is the way, then that is the way. Was hoping for a better diagnostic approach.