n8n Home Assistant: AI Turns Off Forgotten Devices When You Leave

Published at : 18 Dec 2025

💡 About This Video:
End the "Did I leave the light on?" anxiety for good! In this advanced Home Assistant and n8n tutorial, we build an intelligent AI automation to prevent wasted energy and enhance security. Learn the "Query, Check, Action" pattern: n8n queries all devices, AI identifies devices forgotten, and Home Assistant performs a full, automatic auto shutdown when the last person leaves. This is the ultimate solution for event-driven smart home control.

👇PDF GUIDE
Want to build this yourself? I've put together a super-detailed, DOCX with all my notes, full code blocks, and part links to make your life easier. It's set to "Pay What You Want" on my Ko-fi page. Any support is massively appreciated!
Get the guide here:
https://ko-fi.com/s/89499ea54c

👇 Product:
Home Assistant Green: https://s.click.aliexpress.com/e/_c4srkxyP
Home Assistant Voice Preview Edition: https://s.click.aliexpress.com/e/_c350YHFd
Tuya camera: https://s.click.aliexpress.com/e/_c3GEkvcv
Tuya LED Strip: https://s.click.aliexpress.com/e/_c3MJuq45
Tuya Smart Socket: https://s.click.aliexpress.com/e/_c3OsfSlP

👇 Elevenlabs Voice Changer/Clone:
https://try.elevenlabs.io/ogp28osjydmt

👇 n8n Home Assistant Tutorial Playlist:
https://www.youtube.com/playlist?list=PLm7ZdIiU2205AKVMEkCoUUaC_kEjaMYsH

👇 Chapters:
00:00 - The AI Housekeeper: Query, Check, Action Pattern
00:46 - Building the Full n8n Workflow (Steps 1-4: Query & Structure)
03:05 - The AI Decision Engine (Check: AI Agent & Logic)
04:30 - The Dynamic Execution (Action: Code Node & Call Service)
05:56 - Home Assistant Trigger Setup (Webhook & Automation)
07:31 - Final Test & Conclusion
#homeassistant #n8n #smarthome #technology #automation