WTH does the config checker not report all errors in syntax or structure

I’ve commented on this before but now that we have a WTH, why not try again.

The config checker will most times find errors in yaml config and correctly report them.

But there are times when the config check passes but then when you go look at the automation that you just created with an error the automation is disabled due to errors that weren’t reported by the config checker.

It’s not as if the system is unaware of the error because it’s smart enough to disabled the automation that contains the error but it just doesn’t report the error except in the logbook.

The typical way I find that there are errors is I need to go to the automations page and check to see if the automation is disabled. And the error is reported there.

This typically only happens with automations and scripts but it might also happen with other yaml based config but I don’t have any examples of that.

Here are some relevant threads about the situation:

So WTH doesn’t the system just report all syntax errors in the config checker when it’s obvious that the system is fully aware of the errors instead of just silently disabling the automation requiring the user to stumble upon the error when the automation fails to work?

You didn’t vote :wink:

EDIT: WTH doesn’t it automatically add 1 vote for the author?

3 Likes

crap!

You’re right. On both counts. I always forget that I have to vote too. Not that it really matters much in the end. One vote won’t likely change the outcome.

The first link seems to be a out YAML validation on code posted in the forum .
Was that just a random link you posted?

The second link seem to be about HA disabling an automation because a value needed was not available at run time.
This one is impossible to evaluate beforehand.

No neither of them were random. they pertain exactly to this WTH.

They were both talking about the config checker failing to find yaml issues when doing the check but then silently failing and disabling the offending automation (except for a log entry buried in the logs).

the first one gave concrete examples from my and another users experience that should have flagged an error in the checker. One was an example of the “not” condition syntax being wrong and the other one was the trigger using invalid “state:” key instead of the valid “to:” key. Neither of them was looking for anything that was missing until run time that I could see.

the second link is another conversation about the same problem observed by the same two users with additional info provided.

The first lines of the first post in the first link.

I mean, what when you run home assistant instance, it have very powerful yaml validations, but when you post yaml in forum, where is no such validations. Maybe it will be possible to integrate some checks in website engine.

If it is further down the thread, then add / to the end of your link to go directly to that post.