WTH: Is there no way to undo when editing the dashboard

Why is there no undo in the dashboard editor… I have deleted dashboard elements by mistake several times. The last time I downloaded my latest backup and dug into the .storage folder opening the lovelace and finding my missing item… However it took quite some effort and reformating for the card to work again …

Also would benefit when some community integrations go through revisions that change how the dashboard displays only to change it back in the next version. This isn’t even necessarily the result of the integration developer, but sometimes the API the are using for the integration.

1 Like

Versioning on all files would be nice

1 Like

At least the last “delete” action can be undone:
image

For those moments where you realize you’ve just deleted a custom card that took ages to get just right. Sure you could revert to the previous backup, but it sure would be nice if you could just hit the undo button. Same when editing YAML.

2 Likes

Many people keep config in yaml which allows them to:

  • use Ctrl-Z
  • keep source code in Git (version control - yes, needs learning) or at least in Dropbox (which supports history in some extent).

But surely you may keep config in UI and hope that someone someday will add a functionality to keep a history of all changes (((

Agree completely with this, nothing more frustrating than accidentally making some changes and nuking your previous configuration. Would go further to say not just undoing but keeping a history of the changes, so if you nuke something without realizing much later, you can go back to a previous version.

Jetbrains local history saves my skin regularly but it does not work with anything not defined in a YAML file, so not really helpful if editing YAML via the UI.

I love git but a even a lot of the devs I work with already have no clue how to use it. A simplified UX with git being used in the backed could work though.

If edits weren’t applied immediately when edit mode was on, and the “done” button brought up a keep/revert option, that would do the trick.

i agree with this - I’m surprised there is no versioning system for the HA dashboard’s yaml.

i think the best solution HA could implement - is how Grafana handles this (which has alot of similarities to the Dashboard part of HA).

Grafana has a web UI to edit/modify/(or add) “panels” to your Grafana dashboard (which is saved in JSON → database) - you can also directly edit that JSON file in the web UI. At every SAVE event (user initiated by clicking save button), a version is saved, you can then show those changes (diff) , or compare versions, or restore to a version (or restore a version to a new/different dashboard).

I feel this is very similar to home assistant, in that a web ui is how some edit their dashboard and/or add cards, Then that is translated into yaml file (which you can directly edit also, just like the JSON file in grafana).

example of the grafana versioning for a dashboard:

(Unfortunately I’m not a coder, so this is all that I can contribute)

1 Like