esphome / feature-requests

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

Add support for Yaml packages / Templates for dashboard #2892

Open BeatLink opened 3 weeks ago

BeatLink commented 3 weeks ago

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

It would be great if the ESPHome dashboard could support non device yaml files for templates and packages. These would not be treated as devices (with the associated UIs and controls) but would only be available separately to be imported into actual device configs. The only actions for these yaml files would be to validate them.

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

I currently use the dashboard to manage and update my esphome components. To make things simpler I have utilized templates and packages to modularize the configurations, minimize duplications and consolidate common settings for easier management. However, to edit them from the dashboard I have to add them as fake devices, which the dashboard then (expectedly) throws errors when they dont have all of the required device configurations and settings.

Additional context

dala318 commented 3 weeks ago

I have the same situation, but solved it by naming these "packages" starting with a . "dot", ex. .wifi.yaml That way the GUI don't find them and show as devices but can still be used by !include

If you don't like that I think you could also place them in a sub-folder and include with <folder>/<file.yaml>. At lest my "archived" devices that are not live but I still want to keep the configurations for them are in a archive folder and still have their original name and those are not identified.