Add basic versioning to ESPHome Builder #3488
Unanswered
Redsandro
asked this question in
Builder features or enhancements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the enhancement
I'd like to have "save points", snapshots, different versions of a config to be able to roll back to.
Use cases
When I expand on a yaml configuration and end up breaking it, too often do I struggle to get it back to when it was still working fine. One time it took weeks before I noticed a sensor wasn't working anymore. It would save time if I could just peek at last month's configuration to see what I did wrong.
Visual examples
Anything else?
Something simple. Any type of simple versioning would be helpful, as long as it's not too complex. If you want to hear one possible implementation, here's what I had in mind:
The yaml configuration now accepts a
version:key. When using the wizard, it is automatically populated with CalVer.Everything else works the same, although secretly the version is used to store a unique copy of the configuration. The user doesn't see this.
Now when the user changes the
versionvalue and saves, both versions becomes selectable from a dropdown.When editing and saving an older version other than the newest, a dialog shows:
The
$fresh_new_calveroption changesversion:to the latest unused CalVer.I wouldn't recommend an auto-increment function. It is not meant as a full versioning system replacement. Just a simple easy to understand feature that will save many people's day sometime. Users will learn once they alter the version and see the dropdown how this works.
With this system I would tinker until something is "stable" and then change the version next time I tinker, so I know I have a save and working version of the configuration stored.
Extra
It might even be even extra super helpful if the latest firmwares (full and ota) are also stored together with the old configuration(s). Because if you have issues, and remember version 2023.4.1 (some old version) of your config was working, you would be recompiling with a fresh version 2026.1.1 of ESPHome. Sometimes there have been breaking changes. The dialog above would mention this:
Beta Was this translation helpful? Give feedback.
All reactions