

Observer Get information, update or configure the Home Assistant observer Network Network specific for updating, info and configuration imports Multicast Get information, update or configure the Home Assistant Multicast Jobs Get information and manage running jobs Info Provides a general Home Assistant information overview Host Control the host/system that Home Assistant is running on Hardware Provides hardware information about your system You to control and configure different aspects of Home AssistantĪddons Install, update, remove and configure Home Assistant add-onsĪuthentication Authentication for Home Assistant users.īanner Prints the CLI Home Assistant banner along with some useful informationĬli Get information, update or configure the Home Assistant cli backendĬore Provides control of the Home Assistant Coreĭns Get information, update or configure the Home Assistant DNS serverĭocker Docker backend specific for info and OCI configuration The Home Assistant CLI is a small and simple command line utility that allows In a Debian Supervisor installation use just type ha at a root ssh session to open the HA ha You can combine some of these in a script to automatically update elements if files are changed as detailed by kristoffernolgren in his post here If using Docker - Check Config (can easily be amended for non-docker):ĭocker exec -ti home-assistant python -m homeassistant -config /config -script check_config.Note the -H "x-ha-access: yourpass" may not be required depending on your authorisation configuration.Ĭurl -X POST -H "x-ha-access: yourpass" -H "Content-Type: application/json" :8123/api/services/automation/reloadĬurl -X POST -H "x-ha-access: yourpass" -H "Content-Type: application/json" :8123/api/services/group/reload I’ve also incorporated this into a script which quickly checks that the config is okay, and if it is then it restarts HA.Īfter some digging on the API pages I realised you can call a service with curl:Ĭurl -X POST -H "x-ha-access: yourpass" -H "Content-Type: application/json" :8123/api/services/homeassistant/restart We can use the Restart button in the Configuration->General page but I also wanted to be able to trigger that from the command line so that it can be quickly restarted after saving any changes to yamls etc (which I do in through the SSH terminal). I was searching for a solution to this for a while as I didn’t like restarting my docker container every time I made a config change.įor Docker, it turns out that everything comes back up much quicker if we just restart HA inside the container rather than restarting the whole container.
