esphome / feature-requests

ESPHome Feature Request Tracker
https://esphome.io/
411 stars 26 forks source link

Dashboard: Better handling for user-editable yaml include files #2351

Open hn opened 1 year ago

hn commented 1 year ago

Describe the problem you have/What new integration you would like

Improve handling for YAML include files (e.g. for packages, WiFi config, ...) within the ESPHome dashboard. These files should still be editable with the screen editor, but should be displayed somewhat stripped back (no buttons for "Update", "Logs", no "Update available" sign etc. and possibly a slightly different look overall).

Proposal: Files starting with an underscore ("_") are displayed and handled as editable include files.

Alternative or complementary proposal: Offer a switch "show/hide .dot files" within the dashboard.

Please describe your use case for this integration and alternatives you've tried:

I do not want to completely hide the files (by prepending a dot or moving them into a subdir) because I want to edit them from time to time with the screen editor.

Additional context

palves commented 1 year ago

Proposal: Files starting with an underscore ("_") are displayed and handled as editable include files.

And/or allow editing files in subdirectories (and such files in sub dirs would not be considered devices). So you could put your include files in base/ or whatever subdirectory. That's what I initially tried to do, but then quickly reverted to putting the shared files in the the top level config dir (named package-foo.yaml) so I could conveniently still edit them in the web ui.

hn commented 1 year ago

Reconsidered the idea: it would be nice to have an ESPHome-specific list of prefixes and/or filenames that are treated as include (!=device) files:

These files could be made visible by a switch on the dashboard.

The advantage is that if you don't work with "." dot files, that they remain visible and 'non-special' in other systems (shell, git, ...), which is better here I think.