Hass --script check_config doesnt catch all errors

As part of my git process, I automatically test my commits using “hass --script check_config” and there have been times when it passes through the test, and upon deploying to my pi. I get some config issue where something doesnt work. I’m guessing that the check_config doesnt exercise the configs in the same way, or is only doing a lint or something to that effect.

Is there something better I could use to reduce pushing broken code?

One specfic case, is I set up an input_boolean, which passes the tests but home-assistant fails to setup the componenet.

1 Like

Bumping this as I’d like to know the same thing, for the same reason.

I have the same issue. There are certain config errors, which are not reported correctly with the exit code of the check_config script. I don`t have an example at hand right now, but sometimes the script exits with 0 although the log shows an error with the config files.

I started to test my config locally before pushing it to my repo and let travis check it again, since I can`t 100% trust the script exit code.

In fairness, there’s been a lot of work done on this and it’s been pretty accurate for a long while here.

It obviously can’t pick up if a command you’ve included won’t work, or if your template doesn’t acquire the correct information, but I’ve not had any false positives for ages.

Do you have a specific example of what was wrong for you? Maybe do a bug report if you can recreate it reliably.

Ive had (still do) many Hue / Hassio issues ever since upgrading to 0.68 and 0.68.1, Hassio won’t load and Hue keeps losing the lights.
Config checks fine all the time…both in the Hassio environment as in ssh: hassio ha check

You’re going to need to know what errors you get when you restart to know whether the config checker should have caught it.

I suspect you have a deeper issue if you keep losing Hue tbh.

I fear so too, as have many others lately… Hoping for a fix in 68.2

I do not have an example of a false positive at hand currently. I will report one if it happens again. In the meantime I am using this compose file to locally test my config before pushing it:

You can simply run it with docker-compose up