Compared to other home automation products, Home Assistant currently requires far more restarts (or reloads) to perform basic operations. The following operations should not require a restart/reload:
Add or modify an entity
Add or modify an automation
Ideally, additions/modifications should be handled incrementally. In other words, adding/modifying a single entity should only require loading that one entity; it should not require (re)loading all other entities. For example, changing a single automation currently does not require a restart but does require reloading all automations. It should only require reloading the modified automation.
This capability is found in other products including one that is 20 years old so itās not a radically new concept. Advantages include:
Fewer disruptions.
The system continues to function normally, without interruption, while automations and entities are added/modified.
Faster modifications.
It would no longer require waiting for the system to perform a complete restart which may involve a lengthy discovery process plus āsettling timeā for some sensors to become available.
thanks for writing this! Hope this will get the necessary traction and attention from the devās.
Hope (expectā¦) you will be involved when developing this for HA.
Thereās a lot to like about Home Assistant but this curious need to restart for basic operations is an unwelcome āfeatureā, especially for anyone who has used other home automation software.
Iām familiar with about a half-dozen products (ranging from hands-on usage to just ābook-learningā) and only MisterHouse required a full restart. openHAB doesnāt require a full restart but it does reload the entire (for example) Items file whenever it is changed. So not a full restart but still not as refined as other products that donāt need to reload the whole shebang just because one thing changed.
The fact Home Assistant is now several years old and still requires restarting for these basic operations, implies (to me) that the architectural changes needed to avoid restarting are probably non-trivial.
Would LOVE the ability to reload SENSORS & BINARY_SENSORS & possibly template SWITCHES.
More and more I find myself making duplicate sensors / switches to display things differently (some of which could be fixed with Lovelace enhancements Iām guessing [conditional icons / icon colors, state changes { āonā: āOnā, āoffā:āOffā, āclearā:āoffā, etc.}]).
I know the infrastructure is in place for this with something flow I forget what itās called. Itās just a matter of migrating all of the integrations over to that take a lot of time from what I gather.
Theyāre targeting the most popular integrations first is what Iām seeing, which makes sense. I agree though, some of my MQTT devices freak out when they loose HAā¦ which is a problem of itās ownā¦
I have spent countless hours staring at terminal screen waiting for home assistant to restart. Particularly when first learning HA and then setting everything up (is anyone ever actually ādoneā setting it up?)
Iām actually in the same boat right now. Iāve got a memory leak somewhere and Iāve had to restart a bajillion times trying to narrow down where it is. The ability to load and unload stuff on the fly would help tremendously.
Long story short less restarts would make configuration and troubleshooting a much less painful experience. +1 from me.
The above is not the full story, Iāve heard Taras speak in depth about how this works on other platforms (go read the āAlternative HASSā thread, itās a really educational read).
I CAN reload automations without a restart but as @klogg will tell you thatās a recent inovation if you use packages (I do).
At the moment Iām really hesitant about restarts and basically save up minor changes till āI really need this oneā and then the whole raft gets done. Ever tried to troubleshoot multiple changes (yes, thank balloob (heās a god in this simulation isnāt he ? ) for check config but ā¦ )
Say what again? Since when? Scripts and groups too? I thought this would never be supported. I literally just redid my configuration back to non-packages a month ago because I got tired of restarting to test stuff.
When you use packages the āserver control->reloadā¦ā controls didnāt work for those domains (automation, scripts, etc) if they were contained in a package. You were forced to do a restart to cause those things to reload. Apparently the ability to āreloadā those in packages as well was just recently quietly added.
Iām not sure you understood. I was referring to ability to do this when utilizing packages. I mentioned that I converted back so I didnāt have to restart so often.
Iām not even sure the information provided by @Mutt is correct. Iāve been going back through all the Release Notes trying to find when this changed with no luck (so far).
As a matter of fact all I can find are github issues where @arsaboo makes it abundantly clear this feature will never be implemented because of issues with the back end. Perhaps this has changed (I hope it has!) but I cannot find any documentation that says so.
Have you had a chance to verify this yet @finity? Iām trying to track down a memory leak right now and really donāt want to change anything until Iāve got that figured out. Youād think they would have announced it - it looks like a lot of people were looking for it to happen.
My whole system is package based, my configuration file is 27 lines long (3 of those are comments) I have 1089 lines in my ui-lovelace.yaml, 33 z-wave devices, 300 sensors, 69 scripts and 179 automations.
I donāt have a scripts.yaml or an automation.yaml
Youād think Iād notice if I couldnāt reload an automation or a script
I have no issue with the packages implementation.
Adding a package with nothing in it but a couple of input_boolean s would take 5 minutes including a restart. Do it, then add an automation, reload automations and see for yourself if you can get one boolean to switch the other.
Once you have encountered a halting restart, showing the ever lasting Logo and āLoading dataā you know some of these small alterations is flawed, even when the config checker didnāt complain.
Because of that, Ive learned to always restart after changes, even small ones, so I know what to revert to if the proverbial shit hits the fanā¦
The startup time of 90sec+ (and config check of 30sec+) is the only major ugliness left for me in HA and I already moved from raspi to an i5-5200u/8GB. I donāt remember openhab being any better, but in ioBroker one could at least reload each integration.
I donāt mind the waiting that much, but multiple restarts caused real acceptancy problems within the family, so I had to move all the maintenance to the night
I recently discovered Appdaemon where changes are detected and reloaded without restarts. I wished something similar would be possible with the configuration.yaml.