Check config before restart

Ok ok, I know HA is wayyyy better at surviving and running while having errors in the config, but why not check the config before a (manual) restart? Still feels a bit like driving without a seatbelt.

Maybe by adding an optional checkbox in the restart section.

If you restart in the UI Configuration -> Server Control -> Restart, it actually does a configuration check, and only restarts if that check passes.

6 Likes

I never knew! :smile: Good to know; I always first check and then restart so I always do a double check.

Maybe we can then change this to change the copy to make that clear? I assuming a lot of other users do the same and first press check config before restarting.

1 Like

Wait, what!
So I have for years1 unecessarily been doing 'Configuration, [Scroll down], Server Controls, Check Configuration, [wait for success], Restart.

What a waste of a countless number of 20 seconds :wink:

1Ok, not exactly that for years, things have change but you know what I mean

1 Like

So yes, this…

2 Likes

Wow, I’ve always done this manually :sweat_smile:

1 Like

Yeah, I just tried it and I have to say I’m not a fan of how the errors get reported.

Is there a way to put the errors under the “check configuration” button just as you would normally see by clicking on that button?

The way it is now you would have to be watching for the persistent notification in order to see that something was wrong. And if you don’t notice it then you just sit there scratching your head about why the server didn’t restart.

Does this also work with the service call homeassistant.restart? Including the configuration check.

That is the same thing, the button just calls that service.

Thx! Never knew that.

when I was starting with HA 9 months ago) I’ve read that manual verification is the must.
I don’t remember the place but could bet it was in official documentation

Yes. The config check on hitting the restart button must have been added somewhere during the last year. I remember the time there was no config check on hitting the restart button.

Who knew… So how do you know its failed the config check when you call restart from the UI, does it show the same red message below the “check config” button or just not restart?

I guess i could mess up my config and answer that myself.

As (the updated documentation) states you get a persistent notification when it fails.
https://www.home-assistant.io/integrations/homeassistant/#service-homeassistantrestart

1 Like