Automation to switch off light based on motion not triggering anymore (Feb 2021)

Good Day. I have an automation setup to turn off all lights downstairs if no motion is detected. This worked perfectly before. But lately I realized it doesn’t trigger any more. I would wake up and realize that the lights downstairs are still on. Any suggestions?

These are the conditions

Once all the conditions are true, it would mean no one is downstairs and the light will turn off.

Check that each individual motion sensor is reporting the motion and no motion conditions within the sensor history. I recently had a sensor stop reporting all motion to the hub, even though I was getting visual LED blinks from the sensor.

I just double checked and verified that all sensors are reporting correctly for motion and no motion in the history.

My initial thought may seem silly to check but do you notice any changes if you include the Device On/Off Status in the If Condition?

For example if the downstairs lights are powered on, when all those conditions are met(Nobody downstairs), then turn it off. Vice versa if you have a Motion Automation to turn the Down stairs lights on, I’d try including “if the downstairs lights are powered off” to see if the symptoms persist.

I hope this message finds you well!


I think something has to actually happen with the motion sensor or the ceiling fans between 10pm and 4am in order for the automation to do anything. So the fans have to turn off or a motion sensor has to report no motion.

Could something have changed so that no longer happens?

I have been monitoring it for a few days and this I find weird. Now before even if someone wasn’t downstairs at 10pm this automation would execute, see no motion and the fans off then switch off this lights.

What I observed now is that it will only start the process if someone is downstairs after 10pm. It will execute perfectly however if I go upstairs at 9pm nothing happens

Is it that the logic has now changed from what used to occur before. This worked perfectly before.

When was ‘before’? The migration of Automations to run as rules in the Rules API has occurred in recent weeks and although it was presumably intended to be transparent to the user, some things might perhaps behave slightly differently.

However, I have never known Automations to run at the start of a time period. This has always been one of the classic ‘gotchas’ and I can’t see any other reason why the Automation would run without an event in the time period.

For me to understand it a bit clearer. Does the system look at the reported state of the device at a given point in time to trigger an automation? Or does it only trigger an automation based on an event. Shouldn’t the reported state of a device be considered?

My understanding would be that if at 10pm the state is “no motion” the condition would be true and then it should proceed to carry out the desired action. That is how I perceive automation based on a time variable should work.

What are your views?

Note. A very healthy discussion and would help me understand