All Badges Gone When Edited in Yaml

If I add or remove dashboard badges using the GUI, badges are added or removed as expected. However, if I edit them at all in yaml, all badges are discarded when saved, resulting in the dashboard not having any badges at the top. This worked fine at least as of a few weeks ago. Is anyone else seeing this?

Testing further found that if I edit the badges section in yaml, even if it’s just a line break, it disappears as I switch to the visual editor. Other sections are not affected by this and can edited and saved normally.

Yes sir, just tested it and experienced the same disappearing act. If you edit in the raw configurator it does NOT disappear.

Jay, thanks for another confirmation. You mean that if you edit in yaml the badges do stay? My experience is the opposite: all works if editing in the visual editor, but any change directly in yaml makes the whole badges section get wiped when saving or switching back to the visual editor.

This may have to do with the latest dashboard changes.

No I’m saying YAML and Raw Configurator act differently even though technically they are both YAML

YAML in the Badge GUI makes it disappear. For some reason I decided to test it in the lovelace raw configurator and it didn’t disappear.

Got it. I had forgotten about the Raw Editor. Yeap, exactly as you see, the problem doesn’t happen on it.

There is a registered issue about disappearing badges and it is closed by a PR.

This one: Adding a badge name through single dashboard YAML editor removes all badges · Issue #20009 · home-assistant/frontend · GitHub