Add "Edit in YAML" and "Create from YAML" for Helpers (like Automations) #2906
Replies: 2 comments 2 replies
-
|
I setup a dev environment because this would be helpful, thinking that it may be possible to update helpers to use the ha-yaml-editor like ha-automation--editor or hui-dialog-edit- components. Looks like you'd need to add support to both the helper creation dialog flow (dialog-helper-detail), and/or possibly conditionally show it in the more-info dialog. Mostly documenting my brief research into this. I think templates/helpers may be the only configuration where it would actually be helpful instead of harmful to directly edit yaml directly, and I suspect that is the reason it hasn't been done, but I couldn't personally find any discussion on it. The other thing that probably makes it more complicated is that automations, scripts, scenes and dashboards operate off of some trigger, where Helpers are adding or modifying entities. Not 100% on the architecture but I imagine those are handled quite differently and the impact of invalid yaml might be harder to predict for an entity, basically guessing on that one though. |
Beta Was this translation helpful? Give feedback.
-
|
Great proposal. I want to add a broader architectural framing that I think strengthens the case. The real problem: storage format and input format are conflatedThe current situation is:
These are two separate concerns. Conflating them creates a gap that affects the entire ecosystem, not just power users. AI assistants will keep generating YAML — for yearsEvery LLM (Claude, ChatGPT, Gemini, etc.) trained on Home Assistant community content will produce YAML for Helper configuration for the foreseeable future. The community knowledge base — docs, forums, GitHub, YouTube — is written in YAML. There is no mechanism to Today, if a user asks an AI how to create a The fix is simpler than it looksNot "store in YAML" — just accept YAML as input, convert to JSON on import. The storage layer stays exactly as-is. This is the same pattern already working for Automations: Undeclared deprecation is not a migration strategyYAML support for Helpers is being quietly reduced in the codebase, but without any announcement, without updated docs, and without tooling that makes the transition rational. The result: the ecosystem and the codebase are moving in opposite directions. A YAML import path for Helpers would be the minimum viable bridge — and would send a clear signal about what the actual migration path looks like. Proposed scope (minimal):
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe your core improvement
Enable a hybrid workflow for Helpers similar to Automations: start in the GUI wizard for guided creation/structure, switch to YAML mode to edit or add advanced options, and add a "Create from YAML" option to paste/import YAML code directly (with validation).
This is already possible almost everywhere in Home Assistant (e.g., automations, scripts, scenes, blueprints), making Helpers a notable exception — bridging UI ease with full YAML power, without manual config file edits or full restarts.
Current limitations
Editing template.yaml is a poor workaround for novice and intermediate users who rely on the GUI to generate a correct base structure before editing. Direct YAML editing lacks any built-in validation, preview, or error highlighting; mistakes are unforgiving, external file management is required, and syntax errors or broken inter-entity dependencies can easily cause widespread issues. Forcing an all-or-nothing YAML approach from the start hinders learning and discourages gradual progression from GUI to code.
Technical benefits
Additional context
Beta Was this translation helpful? Give feedback.
All reactions