One of the best things I've done with my scenes

Like many of you, HA has become a bit of a passion. Walk into a room, the lights come on, leave the room, the lights go off…

Motion sensors everywhere to keep things running smoothly.

During the day, I’m at work, so the “Away” scene sets the house mode to Away, sets various sensors to armed, sets the Nest to Away, etc. The “Home” scene triggers based on time of day.

Problem is, when I’m away, and the motion sensors trigger, the lights turn on in a room and stay on. Sometimes, it’s not a glitch, only my Neato vacuum “doing it’s thing” while I’m away. It’s a waste of electricity, and I struggled with it. Lower the sensitivity of the motion sensor, angle the motion sensor so as not to look at the floor etc.

Until I “discovered” that scenes can be set to run in ONLY certain MODES! OK, so I’m late to the party… At any rate, I changed ALL my “Turn these lights on” scenes to ONLY run when the house mode is “Home” or “Night”.

Problem solved! :slight_smile:

I am using one my motion sensors similarly and added the plugin Day or Night which is pretty cool. It provides a trigger or virtual outlet based on sunrise and sunset times that switches the outlet from Day to Night. You can create an offset to the sunrise/sunset times to adjust the Day/Night device to switch at different times. I use this for my front porch lights so it only triggers on motion when it’s dark out. It required some code in my porch light scene but ti works like a charm.

That plugin could be useful for you too assuming you don’t already have it.

It was hard to find the LUUP code to do this so I’ve added it here

local dID = 318 – Device ID of your DayTime plugin
local allow = false – true runs scene during daytime, false runs it at night
local status = luup.variable_get(“urn:rts-services-com:serviceId:DayTime”,“Status”,dID)
return ((status == “1”) == allow)