How to read Home Assistant Configuration Errors

Lets say you have this error:

Logger: homeassistant.config
Source: config.py:464
First occurred: 16:28:21 (1 occurrences)
Last logged: 16:28:21

Invalid config for [script]: not a valid value for dictionary value @ data['sequence'][1]['repeat']['sequence'][7]['entity_id']. Got None. (See /config/configuration.yaml, line 206).

And that line 207 (we look for line 207, not line 206 because lists start counting at 0, but your text editor line numbers start counting at 1) is:

script: !include scripts.yaml

Not much use. However inspecting the error:

data['sequence'][1]['repeat']['sequence'][7]['entity_id']. Got None.

tells you everything you need to know.

Things to know before reading that…

  1. everything in brackets is the key, or list number.
  2. lists start at 0 and go up. So the first item is 0, second is 1, and so on.

so, you have a script, and all scripts have a sequence. So, you should know where to start.

['sequence'][1]['repeat']['sequence'][7]['entity_id']

The second item ([1]) in your sequence (['sequence']) is a repeat (['repeat']), it has at least 8 items, and the 8th one ([7]) in the sequence (['sequence']) is getting none (Got None) for the entity_id (['entity_id']).

So, find a script, where your second item in the sequence is a repeat that has 8 items, the 8th item’s entity_id is bad or missing.

Plagiarised from an explanation by @Petro


The Home Assistant Cookbook - Index.

20 Likes

Tom, maybe update the title to say YAML/config errors in particular?

Done. FYI Community guides are like wikis. Anyone can edit them.

1 Like

Nice! I didn’t know. I spotted the edit button now.