The sensor is outputting everything it gets back from the check_config API endpoint. I believe once it hits a failure it stops there, so you’d have to correct that error and then run the check again.
That’s coming in 0.2.0. Wanted to get an MVP out there for testing, but yes, I intend to make auto-restart optional. Should be pushing that update today.
Neither! That’s one of the great things about AppDaemon, once you’ve updated apps.yaml or any of the .py files for installed apps, AppDaemon automatically sees the updates and restarts the apps that need to be restarted.
You should see something like the following in your logs when an update’s been made to an app:
I just tried it and so far it seems like it’s working as advertised.
Now I don’t have to keep jumping around and scrolling all over to test my config and restart. And once I get the lovelace card sorted out it’ll look a lot nicer to boot!
Thanks for this. It’s nice that there are users on here more receptive to fixing things like this than the devs seem to be.
I tweaked the Lovelace card a bit. I wanted the icons to be a bit smaller (& used a couple of different ones) and added a markdown card to a conditional card to display the results of the config check ion line if the result is “invalid”.
Automatically check your configuration.yaml file any time it is updated using folder_watcher. You now can choose to use either the automatic checking setup or the Lovelace setup.
Sensor now changes to checking while the check is in progress. This provides better clarity around when a check is in progress, and is also more friendly to automations so that you can tell when a check has completed and send a notification, for example.
Documentation cleaned up and updated with new features and examples.
I’m particularly excited about the automated checking using folder_watcher. I can now save my configuration in VS Code, get a success or failure Telegram notification on my desktop seconds later, and restart Home Assistant right from Telegram. While you technically could have already set up your own automation to call script.check_config when folder_watcher saw an update to your configuration, this puts it all in one place. It also filters out duplicate folder_watcher events so it doesn’t kick off multiple config checks at once (folder_watcher seems to generate four events every time a file is modified).
As always, let me know if you have any questions or issues!
My wife and nine-month-old are out of town, so the house has gone from complete chaos to having more time than I know what to do with. I’ve wanted to knock this out for awhile so I’m making hay while I can.
apps.yaml - do I need to create that? Do I include that as an include in configuration.yaml? Can I just add the contents of that file to configuration.yaml? Or does it need to be in a separate file?
Yes, this does require AppDaemon. Good point on the GitHub readme for the repository, I’ve corrected that oversight and just pushed a commit that calls out AppDaemon as a requirement.
I’ve also had a PR accepted for the HACS documentation with some additional documentation on using AppDaemon with HACS but I believe the updated documentation isn’t live yet.
In the meantime:
You’ll need to install AppDaemon. apps.yaml will be created automatically when you do so.
Most likely, you’re getting the error in HACS because you don’t have AppDaemon in your HACS config. You’ll need to add appdaemon: True:
19-07-21 15:48:57.434313 INFO AppDaemon: HASS: Connected to Home Assistant 0.96.2
2019-07-21 15:48:57.714504 INFO AppDaemon: Processing restart for HASS
2019-07-21 15:48:57.714775 INFO AppDaemon: Terminating hello_world
2019-07-21 15:48:57.715004 INFO AppDaemon: Terminating check_config
2019-07-21 15:48:57.715184 INFO AppDaemon: Initializing app hello_world using class HelloWorld from module hello
2019-07-21 15:48:57.716479 INFO hello_world: Hello from AppDaemon
2019-07-21 15:48:57.717621 INFO hello_world: You are now ready to run Apps!
2019-07-21 15:48:57.717733 INFO AppDaemon: Initializing app check_config using class CheckConfig from module checkconfig
2019-07-21 15:48:57.717854 WARNING AppDaemon: Unable to find module module checkconfig - check_config is not initialized
I have to laugh as well… what with installing Appdaemon and adding the repo to HACS and editing the yaml etc I didn’t know if I was coming or going and just neglected to actually click on INSTALL on the component!