WTH - Auto YAML generation needed for all UI configurations

Current Working Example

Automations and Scripts already do this perfectly:

  • Created in UI
  • Automatically saved as YAML files
  • Accessible in /config/automations.yaml and /config/scripts.yaml
  • Can be easily backed up, shared, or modified
  • Version control friendly

What Needs The Same Treatment

  • Helpers
  • Custom sensors
  • Dashboard configurations
  • Device triggers
  • Template sensors
  • Input entities
  • Counter entities
  • All other UI-configured items

Proposed Implementation

Just like automations.yaml:

Copy

/config/
  helpers.yaml
  sensors.yaml
  dashboards.yaml
  device_triggers.yaml
  templates.yaml
  inputs.yaml

Benefits

  1. No additional UI work needed - use existing auto-generation system
  2. Consistent with current automation/script handling
  3. Easy package creation
  4. Simple backup process
  5. Better system transparency
  6. Faster configuration management

Home Assistant already proved this works great with automations and scripts - let’s extend it to everything else!

yaml #auto-generation Configuration backup

The other items you mentioned are stored as JSON in the /homeassistant/.storage directory. You can currently version control those files.

FYI – The intent is for YAML to be used for people, and JSON for the system. So, if you configure it in the UI, the files will always be stored as JSON.

I understand the system’s design choice, but there’s a practical issue here. While these JSON files in /homeassistant/.storage are version controllable, they’re so large that VSCode freezes when trying to open them. This makes manual inspection or editing nearly impossible.

YAML would be much more practical because:

  • It’s far more human-readable
  • Easier to edit and share
  • Better compatibility with existing YAML configs (like automations.yaml, scripts.yaml)

While I understand JSON is for the system and YAML for people, maybe we could have an export option to YAML? This would maintain the system’s JSON storage while giving users a more manageable way to work with these configurations.

2 Likes

While I understand your request, I think it is unlikely given the following blog post. The “Myth Busting” section specifically deals with version control:


how can i know where is problem ? hmm

That’s a bug, its not for you to figure out unless you know the code.

In general you shouldn’t need to adjust or share the JSON files. If you’re in there, that’s a gap in HAs UI.

Hi Petro,

I understand it’s a system bug, but I have some thoughts about this:

  1. Why are all logs displayed to users in the same way, without clear distinction between:
  • errors that users can fix (like misconfiguration)
  • system bugs that users cannot fix
  1. For regular users, it’s confusing to see error messages they can’t do anything about. Wouldn’t it be better to:
  • show system bugs only in developer mode
  • or at least visually distinguish them from user-fixable errors
  • or add a note like “System bug - please report to developers”

This would significantly improve user experience and save time when troubleshooting issues.

Best regards, Roman

As a yaml-oriented user, I see no benefits of keeping UI-controlled things in yaml files.
A user may open any of these files & make changes which may cause a damage.
I would vote to move UI-controlled automations & scripts to json to make them more protected from users.
If you need a full control & know what you are doing & understand consequences & take a whole responsibility - then use yaml packages w/o UI.

1 Like