Last updated:
Quick answer
Describe the automation in plain words: what should trigger it, any conditions, and what should happen. The AI writes the YAML in the current format, and you test it in Home Assistant before trusting it.
At a glance
All outcome figures are estimates from cited sources, not independent verification by us.
- What it is allowed to do
- Drafts for you
Writes drafts (emails, posts, plans, replies). You review and send. Nothing goes out without you.
- Time saved (estimate)
- Estimate: 30 to 60 minutes per automation versus writing YAML from docs.
- Difficulty
- Intermediate
- Tools needed
- ChatGPT, Claude, Home Assistant
- Typical cost
- Not stated in sources.
Reviewed Oct 19, 2026
Basis (estimate): Estimate only: based on replacing manual YAML composition and doc-reading with a generated draft plus testing.
What does this setup do?
Write Home Assistant automations with AI: describe the behavior in plain words, get correct YAML in the current format, and verify it safely.
Who is it for?
Home Assistant users who understand automations conceptually but dread writing YAML by hand.
How do you set it up?
Tools
- ChatGPT or Claude (free tier is fine)
- Home Assistant installed with the devices you want to automate
- Your exact entity IDs (from Developer Tools, then States)
Steps
- Know the three parts first. Home Assistant’s docs define every automation as: When (triggers, e.g. motion detected), And if (conditions, optional, e.g. someone is home), Then do (actions, e.g. turn on a light).
- Look up your real entity IDs in Developer Tools, then States. The AI cannot know your devices; invented entity names are the number one reason AI-written automations fail silently.
- Describe the automation in plain words with the three parts: the trigger, the condition, the action. Include the exact entity IDs.
- Ask for YAML in the current format. Key names changed over releases: service became action, platform became trigger, and singular trigger/condition/action became plural. Old keys still work but cannot be mixed with new ones in the same automation.
- Paste it where it belongs. Automations created in the UI live in automations.yaml, which is UI-managed; manual YAML goes in configuration.yaml, and you must reload automations after changes.
- Test before trusting. Trigger it manually, watch what happens, and check the automation’s trace to see each step execute. A unique id on the automation enables renaming and stores debug traces.
- Start with harmless automations: lights and notifications. Save locks, alarms, and anything with water or heat for after you trust the pattern.
Example output
Illustrative. Your results will differ.
- Your draft rewritten: clear, polite, half the length
- Tone matched to a work email, not a text
- Send the version that sounds like you.
Where to paste this prompt
ChatGPT: ChatGPT → Project instructions, or ChatGPT Tasks for scheduled reminders (once a day on Free)
Copy-paste prompt
Adapt bracketed fields to your situation.
Write a Home Assistant automation in YAML. I will test it before relying on it.
What I want in plain words: [e.g. "When motion is detected in the hallway after sunset and someone is home, turn on the hallway light to 50%, then turn it off after 5 minutes of no motion"]
Trigger entity: [exact entity ID, e.g. "binary_sensor.hallway_motion"]
Condition: [e.g. "sun below horizon AND someone home (person.you)"]
Action entities: [exact entity IDs, e.g. "light.hallway"]
Rules:
- Use the current YAML format: triggers, conditions, actions (plural keys), action instead of service.
- Use ONLY the entity IDs I gave you. Never invent device or entity names.
- Include a unique id so I can rename it and view traces.
- After the YAML, give me: where to paste it, how to reload, and how to test it step by step.
I will review the YAML and test the automation manually before trusting it.Newsletter
Get the free starter pack
Free starter pack with five beginner copy-paste prompts after you confirm, plus three sourced setups in your inbox each week. Unsubscribe anytime.
What usually goes wrong?
Where agents tend to stall on this job. More patterns in Where AI gets stuck.
- Invented entity IDs. The AI will happily write light.living_room when yours is light.livingroom_lamp. It fails silently. Always paste real IDs.
- Mixed old and new key names. Old keys still work, but mixing service with actions in one automation breaks it. Pick the current format and stay in it.
- Trusting it on the first try for anything physical. Test with lights and notifications first; locks, garage doors, and water valves earn trust over time.
Which chat tools work with this prompt?
Paste the prompt into any of these assistants (free or paid tiers).
- ChatGPT
- Claude
Common questions
- Do I need to know YAML?
- No, but you need to know your entity IDs and the trigger-condition-action structure. The AI writes the YAML; you verify and test it.
- Where do I paste AI-written automations?
- Manual YAML goes in configuration.yaml, then reload automations. Do not hand-edit automations.yaml; that file is managed by the UI.
- How do I know if it actually works?
- Trigger it manually and watch. Give the automation a unique id so you can open its trace and see each step execute, which shows exactly where a broken one stops.
What tips make it smoother?
- Entity IDs are everything. Copy them from Developer Tools, not from memory. One wrong character and the automation silently does nothing.
- One automation, one job. Combined mega-automations are harder to debug; split them and the traces will tell you exactly which part failed.
- Keep a text file of working automations with a one-line note on each. When one breaks after an update, you have the last-known-good version.
Where do the claims come from?
Summaries use public sources linked below, not independent verification. How setups are picked.
- Read Home Assistant’s write-up (www.home-assistant.io)
Home Assistant: Automation YAML structure, triggers/conditions/actions lists, and the old-to-new key renames.
- Read Home Assistant’s write-up (www.home-assistant.io)
Home Assistant: What triggers, conditions, and actions are, and how the When/And if/Then do editor maps to them.
Related setups
- iPhone Action Button opens one bot
Map the iPhone Action Button (or Back Tap) to a Shortcut that opens one specific Bot chat instantly, so you are not hunting the sidebar when you want the same agent every time.
- ChatGPT scheduled reminders with Tasks
Create a repeating ChatGPT Task that reminds you to do a specific checklist job (follow up, review subscriptions, prep for Monday) on a schedule you choose.
- How to give your AI bot a long-term memory with an Obsidian vault
Replace fuzzy in-chat “memory” with inspectable Markdown files: the bot appends a daily note and decision log to a Git-backed vault; you review in Obsidian; a weekly routine sorts an Inbox folder into PARA (Projects, Areas, Resources, Archive).