Edit: Packages looks to be a solution to the non-GUI aspects of this Feature Request. Thanks for highlighting it, @Sir_Goodenough! It’d still be great if the ESPHome setup flows allowed for easier assembly and inspection of package contents.
Even when using includes to wrap common code/functionality, it can be more difficult than it needs to be to manage or update multiple devices of the same type/configuration in ESPHome. Additionally, it’s easy to make mistakes when getting a shared yaml configuration from someone else, since manual editing of a file for your own local environment is often required.
ESPHome should have ‘blueprint’ like functionality to facilitate sharing of configs and managing/maintaining multiple identical devices.
There’s already a concept of ‘substitutions’ in ESPHome.
ESPHome also supports includes in the yaml code.
However, when editing a file in the ESPHome dashboard, it’s impossible to jump over to the contents of an included file for viewing or editing. You have to use an alternative editor to view/change them.
Specifically, I’d like to be able to generate a working YAML file by picking my base file - say “Sonoff_S31.yaml”, filling in the required substitution values (WiFi credentials/secret location), device name, etc, etc. All without having to manually edit a text file (or jump into an included file to verify all the substitutions that are required.)
Hopefully the GUI could let me know which devices are running a specific ‘blueprint’, so if I do edit the underlying yaml, I’m aware of which devices are impacted, and if a new substitution is added, the update/deploy button would prompt the user to supply replacements for any new substitutions.
Looks like this has been brought up before, but not as a FR- here’s an older link:
I think what you are looking for is packages. Configuration Types — ESPHome.
I have packages set-up for this and that and just add them to my new installs. If the package isn’t exactly right I load a substution in my main yaml and that overrides the value in the package.
If you are looking for full blown package installs, the ‘Ready Made Projects’ page shows you how that works, as these are all full blown installs that are pulled in from remote like a blueprint whenever they change. Ready-Made Projects — ESPHome.
I don’t believe you need any more that that. Everything you ask for is there, except the GUI.
I was not aware of the packages feature, I’ve been doing similar (but less elegantly) with normal includes.
This definitely looks to be a lot better. Thanks for pointing me that way!
It’s still missing the GUI piece, though, as I can’t generate a new device with any packages I’ve defined, I’d need to set up the baseline file. I’m also guessing the built-in editor isn’t going to allow me to jump into the package contents (or give me a listing of available packages) when I’m trying to set up or modify a device.