My Home Assistant setup is years deep. Dead sensors that never got buried, automations layered on automations, and a pile of YAML I’d learned to stop opening in case I broke something that still, somehow, worked. This week the whole tangle went to Claude to start cleaning up.
There was a first attempt at this, maybe a year ago, with ChatGPT. It rewrote its way straight into breaking things — entities renamed to nothing, automations pointing at sensors that no longer existed. Rolling that back taught me to go back to doing it by hand, slowly and reluctantly.
This time lands differently in the way that matters: the whole setup gets read before a line is touched, and every change comes with its reasoning, not a wall of new YAML to trust on faith. It began by mapping the estate — 527 sensors, room by room — and the first pass alone turned up years of quiet rot.
Nearly half my temperature and humidity sensors were dead: 33 of 69. Two utility meters had spent months reading from a source that died back in February. And the sensor I trusted as “outside” wasn’t measuring outside at all — it sat around 8°C too warm all night, a self-heating box the garden and weather readings quietly disagreed with.
The automations hid better bugs. One bedroom plug does double duty — fan or motorcycle charger, chosen by a selector — and a hand-over rule meant to fire once was left as a standing condition. A re-check added that same night, to stop a fan stranding on, set it loose: it cut the charger every five minutes. My bike couldn’t charge, and nothing had ever said why.
The one thing still grinding is going back to raw YAML at all. My config is split the tidy way, with include_dir into structured, named files — and the reward for that discipline is a UI that won’t touch a single one of them. Open any automation and it’s the same yellow warning.

I dug into why, expecting it to be my fault. It isn’t missing IDs — all 112 have them. Home Assistant’s automation editor only ever reads and writes one file, config/automations.yaml, and my include_dir setup means none of mine live there. The editor disowns anything it didn’t write itself.
That “Migrate” button is not the escape it looks like. It only copies an automation out into automations.yaml and can’t remove the original — so pressing it 112 times would leave a flattened heap and orphaned duplicates. The exact mess I split the config to avoid.
So there’s no clean way, today, to edit structured YAML from the UI without surrendering the structure. That is the gap I wish they’d close. Until then, raw YAML is where I stay — except now Claude keeps it tidy, instead of me letting it quietly rot.