Reloading - its such a mess!

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.

Otherwise you’re restarting HA.

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.

1 Like

Okay, so its not just me - phew :wink:

My configuration.yaml includes files like this - is that what you are talking about that does not work ?

image

no that should work.

it’s when you do “!include_dir_merge_list” that it doesn’t

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.

Great thanks!

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.

1 Like

I have all of my groups, automations and scripts in individual files in their own directories under /config and includ them with:

automation: !include_dir_merge_list automations/
script: !include_dir_merge_named scripts/
group: !include_dir_merge_named groups/

They all reload fine using the buttons under /config/core.
I haven’t seen any limitations there yet.

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:

Per Issue #9864 and Issue #16117.

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.

automation: !include_dir_merge_list Automations/

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 :crossed_fingers:

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.

It’s also great motivation to learn how to use AppDaemon or NodeRed!

I just moved ~80% of my automations to AppDaemon last week and could not be happier with it.

Maybe. It doesn’t bother me. I don’t need to add more complexity.

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.

1 Like

Agree - it does give you a lot of options.

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.

1 Like

The GUI editor that was a work in progress in May 2017 and hasn’t been touched since :smile:

Maybe they should just fix the reload button already.

2 Likes

I was not aware that your could move automations into AppDeamon and/or NodeRed ?

Interesting … thanks!

Okay, Node-Red is pretty cool and easy to use - thanks for the pointer guys :wink: