WTH do all automatons get reloaded when you change any of them?

I’m sure there is a good reason for this… But making a small change to an automation causing others to be stopped mid-run isn’t great.

“Incremental reloading” would be a game changer. Only reload the new/modified automation and leave all others undisturbed (especially the ones that are in-progress).

6 Likes

What if the new or changed automations were added to their own temporary database file that is only appended to the main automation file on or right before reboot? Idk how HA loads the yaml file but seems like a big mess with having all the eggs in one basket.

1 Like

Editing Automations in the UI and saving an update to a SIGNLE automation actually reloads EVERY automation. This, I believe, also stops all in-progress automations (those waiting on delays, wait-for’s, etc.).

The other adverse side effect is that it floods the logbook with EVERY automation being reloaded (one denoting unavailable and another denoting available I believe).

WTH? Updating / Savings a single automation should update ONLY that automation instead of ALL automations.

Duplicate, vote/comment here: WTH do all automatons get reloaded when you change any of them?

1 Like

I’ve merged them :+1:

2 Likes

Thx. Unsure if it matters, I posted a Feature Request about it here a few months back: Disable Automation On/Off/Unavailable Logbook Entries

This implements selective reloads of automations edited from the UI: Only reload modified automation by emontnemery · Pull Request #80254 · home-assistant/core (github.com)

A second attempt which works also when using the “Reload automations” button in the YAML dev tool: Only reload modified automations by emontnemery · Pull Request #80282 · home-assistant/core (github.com)

14 Likes

The pull request has been merged, so unless some form of issue crops up that needs it to be reverted, this will be fixed in the next release.

4 Likes

Wonderful news and thank you for your work. :+1:

Currently, reloading automations via the UI or by automation.reload will reload all automations. In the future, will the UI and service call default to reloading only new/modified automations?

If so, will there be an ability, in the UI and/or service call, to force the reloading of all automations?

For example, something like this?

service: automation.reload
data:
  all: true