I really, really love Home Assistant - and the possibilities it gives me!
But, its such a mess when changing the different files - and getting them RELOADED (automations, scripts, zones, groups, customizations, known_devices and many more).
Some things like automations can be reloaded, but its not always seems like it really reloads, and I often end up restarting my entire HA box, whick takes 3-5 minutes.
I really miss a clear explanation of HOW / WHERE to reload stuff when working on the different areas ?
Reload automations, groups and scripts are pretty self-explanatory, and I havenât noticed a time that they donât work unless they rely on some other thing that youâve also updated but not loaded yet.
Reload core, I think, reloads the customize.yaml
And if youâre using Lovelace you can reload it as well but not from the same menu, itâs the 3 dots top right to do that.
This is correct, as far as I know, however something important to point out is that if you do not have everything in a single file, and are using âadvancedâ compartmentalizing tricks (splitting the configuration) such as using â!include_dir_merge_listâ then some of these will not work. For example if you have your automations split out into a folder with a file for each roomâs automations, then âreload automationsâ button will not work, and you must restart all of Home-Assistant to have those changes take effect. (Restart HA, not restart the host machine).
To restart less, you could migrate your automations to NodeRed or AppDaemon which run independently of HA and donât need to be restarted to accept changes, and use the LoveLace UI which immediately accepts changes, but when making changes to the core system (components, sensors, etc) unfortunately you will be left restarting it a lot.
I believe since you are only using a single file for each of those, that the reload button should work.
However I canât seem to find any official documentation that says using âinclude_dir_merge_listâ will break the reload button. Thatâs been my experience at least, and I seem to recall reading it somewhere.
This is one of the reasons I moved my setup to a NUC. I just happened to have one sitting around, but the speed difference on reboots is so huge that Iâd never switch back. It would be great if there was a button where Home Assistant could somehow check for components that have had their configurations changed and only reload those components though.
If you are using packages to split your configuration, the devs have said that the reload buttons being broken is known, but thereâs no intention to fix it:
As for the âstandardâ way of splitting automations, my configuration.yaml has the following (below) in it and will not reload it without restarting all HA. Maybe thatâs only a bug in my system (HassIO), but I do recall hearing it confirmed from someone, maybe on discord, but I canât find anything official about it.
The issues you referring to might only have to do with package-based configurations - if you have automations, scripts or groups within a package these items do not reload when you hit the respective button afaik.
Thatâs one of the reasons why I keep my automations, etc. outside the packages i.e. I only define inputs, binaries, sensors, etc in there.
Sorry to hear the the reload doesnât work for you - Iâm running my HA in Venv and it seems to be fine
Yes I have automations in packages as well. Itâs strange that you are encouraged to use packages and then when you reload automations it does not scan there as well. Anyway, once you are aware of it I just tinker what I am doing and then when I am finished do a home assistant restart. Itâs only a gotcha when you donât realise it.
Not to start straying off topic of the original thread, but Iâve found AppDaemon great for reducing the repetitiveness of many of my automations. I had many automations which were more or less duplicates of each other just with different entities in them, slightly different parameters, or other small things like that. Motion detector triggered lights is one example.
With AppD itâs easy to create one templated automation that you just create many instances of with the entities and parameters as needed.
I would not be surprised if this were also possible with the yaml automation engine, but Iâve always found the jinja templating in it clunky and difficult to get right. To each their own, obviously, this is just a word of encouragement to others thinking about taking the dive.
I was playing around with AppDeamon as well a little, but once I started understanding templates better - and especially the use of things like âtrigger.from_state.entity_idâ and for/endfor - I decided against it.