Load your Home Assistant config into an agent

A user turned Gemini into a Home Assistant helper by feeding it their entities and YAML, then iterating on code until it compiled.

Done with Gemini· Intermediate· Jan 2026

What they did
They created a Gemini Gem for Home Assistant work and added their entity list, configuration YAML, and setup notes to its knowledge base. After that, they asked it to draft ESPHome and Home Assistant code, then pasted compiler messages back into the chat so it could revise the snippets. For smaller setups, they simply copied in the entities; for larger ones, they suggested uploading the list as a document.
How it went
They said the agent eventually produced code that worked, and the whole job wrapped up in about a day instead of taking much longer alone. Along the way, they hit compile errors, ran into outdated repositories, and had to use follow-up prompts to catch missing details.
Tips
This works better when the agent has your real entity names, YAML, and a saved prompt you can reuse. Treat the first draft as a starting point and be ready to feed back error messages until the code passes checks.

Try it yourself with Gemini

You are my Home Assistant expert. I’m going to paste my entity list and relevant YAML here: [paste entities and configuration YAML]. Help me build [automation/script/device code] for [goal]. Use only the entity names and settings I actually have, show where each YAML block belongs, and point out any assumptions or gaps before I save anything. If a step would change something live, delete data, or send anything, stop and ask me to confirm first.

Fill in the [brackets]. Agents can make mistakes, so review anything before it is sent, paid or deleted.

Get 3 agent uses like this every morning

With the day's top AI news. Free, and one click to unsubscribe.