{"id":101,"date":"2026-06-10T20:04:34","date_gmt":"2026-06-11T00:04:34","guid":{"rendered":"https:\/\/domox.tech\/?p=101"},"modified":"2026-06-11T14:24:23","modified_gmt":"2026-06-11T18:24:23","slug":"motion-activated-lighting-with-home-assistant-local-no-cloud","status":"publish","type":"post","link":"https:\/\/domox.tech\/pt\/motion-activated-lighting-with-home-assistant-local-no-cloud\/","title":{"rendered":"Motion-Activated Lighting with Home Assistant \u2014 Local, No Cloud"},"content":{"rendered":"<div>\n<h2 class=\"gb-text\">Motion-Activated Lighting with Home Assistant \u2014 Local, No Cloud<\/h2>\n\n\n\n<p class=\"gb-text\"><strong>Introduction<\/strong><br>This is a simple and reliable way to turn on lights automatically when motion is detected using Home Assistant.<br>The goal is to keep everything <strong>local<\/strong>, fast, and independent from cloud services.<br>This setup works well for hallways, bedrooms, bathrooms, or entry points.<br><br><strong>What you need<\/strong><br>Home Assistant running (Raspberry Pi, NUC, etc.)<br>A motion sensor (Zigbee or WiFi)<br>A smart light or smart relay (Zigbee or WiFi)<br>Recommended:<br>Zigbee motion sensor (more stable, lower latency)<br>Zigbee light switch or smart bulb<br><br><strong>Basic concept<\/strong><br>The logic is simple:<br>If motion is detected \u2192 turn light ON<br>If no motion for X minutes \u2192 turn light OFF<br><br><strong>Step-by-step setup<\/strong><br><strong>1. Add your devices to Home Assistant<\/strong><br>Make sure:<br>Motion sensor appears as a binary sensor (motion \/ no motion)<br>Light appears as a controllable entity (switch or light)<br>Example:<br>binary_sensor.hallway_motion<br>light.hallway_light<br><br><strong>2. Create the automation<\/strong><br>Go to:<br><strong>Settings \u2192 Automations \u2192 Create Automation<\/strong><br><br><strong>Trigger<\/strong><br>Type: State<br>Entity: motion sensor<br>To: on<br><br><strong>Action<\/strong><br>Type: Turn on light<br>Entity: your light<br><br><strong>3. Add auto-off delay<\/strong><br>Add a second automation OR extend the first one:<br>Trigger:<br>Motion = off<br>For: 5 minutes (adjust as needed)<br>Action:<br>Turn off light<br><br><strong>Recommended improvement (important)<\/strong><br>Instead of instant OFF, always use a delay:<br>Bathroom: 2\u20135 min<br>Hallway: 1\u20133 min<br>Bedroom: 10\u201315 min<br>This avoids flickering lights when you are still in the room.<br><br><strong>Common mistakes<\/strong><br><strong>\u274c Motion sensor too sensitive<\/strong><br>\u2192 leads to constant toggling<br><strong>\u274c No delay before turning off<\/strong><br>\u2192 lights turn off while still inside<br><strong>\u274c Mixing cloud devices<\/strong><br>\u2192 introduces lag and instability<br><br><strong>Advanced idea (optional)<\/strong><br>If you want better behavior:<br>Add \u201csun condition\u201d<br>Only activate when it is dark<br>Condition example:<br>If sun is below horizon \u2192 allow automation<br><br><strong>Related:<\/strong><a href=\"https:\/\/domox.tech\/category\/security\/\"> Frigate + Home Assistant on Raspberry Pi 5 \u2192<\/a>&nbsp;<br><strong>Conclusion<\/strong><br>This setup is one of the simplest but most useful automations in Home Assistant.<br>It improves comfort, reduces manual switching, and works fully locally without dependency on external services.<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Motion-Activated Lighting with Home Assistant \u2014 Local, No Cloud IntroductionThis is a simple and reliable way to turn on lights automatically when motion is detected using Home Assistant.The goal is to keep everything local, fast, and independent from cloud services.This setup works well for hallways, bedrooms, bathrooms, or entry points. What you needHome Assistant running &#8230; <a title=\"Motion-Activated Lighting with Home Assistant \u2014 Local, No Cloud\" class=\"read-more\" href=\"https:\/\/domox.tech\/pt\/motion-activated-lighting-with-home-assistant-local-no-cloud\/\" aria-label=\"Read more about Motion-Activated Lighting with Home Assistant \u2014 Local, No Cloud\">Read more<\/a><\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-101","post","type-post","status-publish","format-standard","hentry","category-automation"],"_links":{"self":[{"href":"https:\/\/domox.tech\/pt\/wp-json\/wp\/v2\/posts\/101","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/domox.tech\/pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/domox.tech\/pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/domox.tech\/pt\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/domox.tech\/pt\/wp-json\/wp\/v2\/comments?post=101"}],"version-history":[{"count":4,"href":"https:\/\/domox.tech\/pt\/wp-json\/wp\/v2\/posts\/101\/revisions"}],"predecessor-version":[{"id":123,"href":"https:\/\/domox.tech\/pt\/wp-json\/wp\/v2\/posts\/101\/revisions\/123"}],"wp:attachment":[{"href":"https:\/\/domox.tech\/pt\/wp-json\/wp\/v2\/media?parent=101"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/domox.tech\/pt\/wp-json\/wp\/v2\/categories?post=101"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/domox.tech\/pt\/wp-json\/wp\/v2\/tags?post=101"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}