WTH - Have a "Reload" button in their respective sections

Yeah, that’s the one thing that gives me pause with this “WTH” – it seems like everything’s moving toward being editable entirely in-app, without external editors. Once that happens, the issue would (I assume) be moot since all in-app saves would refresh automatically.

That said, I still very much consider this a “WTH” in the sense that it’s a relatively minor annoyance with a relatively simple solution.

While it seems to be super comfortable it’s not optimal in real life. You may want to save file (or even several files) multiple times before you really want to apply changes. aplying them in the middle of work will rise unnecessary errors.
Actually mission critical systems never apply changes automatically. Explicit command is required for that.

1 Like

Offering current working solutions is not unprofessional. I’ve done my share of support over the past 10 years and there’s 1 thing you learn from that: People want answers and solutions now, not later.

2 Likes

Yes, but I must misunderstand your question WTH then. Because I would only expect changes like this to work in the UI.

Yeah, the only odd thing would be the scenario where you save a ‘bad’ template that causes the system to not start.

When offering help is always welcome, wth is not for looking for help aka workarounds (tgere are other sections of this forum for that). in fact everybody knows it’s possible to use second browser instance.p more: both windows can be open next to each other. But in context of this thread it just seemed to me like excuse to not improve user experience because the workaround already exists.

This is how I received it. If it was not your intention then I apologize.

These are discussions and mods are not developers, how is it that my suggestion is “an excuse to not improve user experience”?

I agree with @petro here
Have a discussion, invite critisism, rebuff critisism where you can.
If you can’t your idea is worthless
Rebuffing it with reason makes your argument stronger.

petro / @Mariusthvdb / @donkawechico , your ideas here are very similar to @123 where he proposed a more seamless approach , where any file save (be it from the GUI or external editor) trigger an event which would determine if a config check was necessary, if it was, then one was performed.
It would then notify you “if it failed”
Subsequent to a sucessfull config check it would imediately reload the edited file into the system (maybe wouldn’t need a full reload that way).
Dunno.
Taras explains it a lot better than I and I can’t remember the thread

Scenes do reload when you save them, so not sure what the issue here is?

Yes, but I must misunderstand your question WTH then. Because I would only expect changes like this to work in the UI.

Not that it matters, but I’m just a passerby who agrees with the OP’s WTH.

So, I was trying to figure out whether the implementation you had in mind was UI-based or independent of UI.

Examples of non-UI solutions:

  1. An OS-level daemon that monitors yaml files and reacts to any modifications. This would be entirely independent of how you’re editing your files, whether it be the UI, through external VSCode, nano, or even $ echo 'blah' << scripts.yaml.
  2. The desktop version of VSCode has the “Home Assistant” extension, which comes with built-in tasks you can execute for reloading config sections. One could write an “on save” hook that runs that task from within the VSCode IDE.

I just want to say that I am very much fan of the “commit” approach. Eg. that changes have to be explicitly loaded. It can very well be easier to do it, with a more visible button or something, but automatically enabling all changes immediately can very easily lead to unexpected results.
I often change both sensors, automations, notifications and other sections with inter dependencies, and reloading the sensors before the automations are fixed (or the other way around) can really be problematic.

2 Likes

Even better: HA could monitor the files for changes, like for example logback for Java is doing with its config files.

Wow, didn’t mean to trigger all this commotion, but in all good discussion all around.
Yes, my original post was for the UI based changes. I do the majority of my editing directly in the yaml files but decided a while back that I would give a try to use the GUI for Scenes. For that purpose, I enjoy the UI as I can create a quick scene from the existing state of my bulbs.
The suggestion came after editing several scenes and even after saving, my new (edited) scenes didn’t work until I went to the Sever Configuration page and reloaded them. I thought a button directly on the page would make sense.
For other functions, that may not work as well, but I like the suggestion of triggering a config validation first and then a commit when clicking reload.

yes, of course the system would need to check the new template (and only that, not the full system…)

it wouldn’t have to restart the system, that’s the whole point, only load the new template sensor :wink:

The problem with automatic reload and initialization when you save a file, is that you might inadvertedly trigger an automation if you change a sensor that the automation depends on before the automation is updated - or if change an automtion to require new values from a sensor, but have not updated the sensors yet.

Unless you always use packages, and keep everything that can ever be related in one single file, this is a recipe for “disaster”.
I’d rather be sure I have modfied all the necessary components before doing a reload (or “commit” as I prefer to call it in my day job…), than something jumping at me because the software starts caring about peices of the config that it is not yet ready to handle properly due to other pieces of the pussle still missing.

I found this thread because I just found myself wishing there was a reload button on the Automations and Scripts pages. I had to go from the Automations page where I was at -> Main -> General -> Server Options (a hefty little scroll that has been complained about elsewhere), Click Reload Automations, then go back Main -> Automations where I could finally do what I wanted to in the first place which could all be avoided if this button existed.

Sort of surprised this WTH wasn’t picked up by someone. Seems like a no brainer to me but when you have no brain everything is a no brainer! :crazy_face:

@petro Auto Reload? Please god no!!! On my poor RPi 3 it currently takes an average of 2.5 minutes for my automations to reload. I would be PISSED if I had to sit there looking at a screen for a couple minutes every time I saved an automation. I do enough waiting already thank you very much (even my lovelace takes over 3 minutes to reload). Just the button in the right spot would be lovely.

3 Likes

A “Reload Automations” button under the “Add automation” one and styled the same would be perfect!

The same applied to other reloads would be great too.

Mine doesn’t take long to reload - just a few seconds - but I’m running in a VM but having the button also available on this page would save a bit of swapping back and forth on tabs/windows/etc.

I agree… it should just reload when you save it.

I’m pretty sure this happens already.
Reload only need when to change a yaml automation
I’ve made.some changes today and they worked straight away, just realised I hadn’t reloaded them. It happened automatically
When you save an automation you’ll see them all flick off and on briefly