When I put condition in, I tested it passed the conditions but it won’t trigger my lights to turn on. However, if i remove the condition. It works.
Anyone has encountered this?
So if im reading your automation correctly… when he trigger happens. (just after motion, remember the trigger happens instantly… ) it then checks the condition.
And you have said motion must be active for at least two seconds…
But the trigger was instant right after motion started.
Hi finity, I tried putting the time in the trigger but it triggered straightaway. What I trying to do is to make the sensor not so “sensitive” so only when i trigger it more than 2 seconds it will trigger it. Also i tried removing the is_motion condition and leaving the is_illuminance condition to test if the condition works, but it also did not work. The condition tested “Passed” but it still does not run the action.
@yuejun I don’t think the 2s is going to help here. Most of these sensors stay “on” when motion is detected for at least 30 seconds. In general the only way to adjust their sensitivity is by adjusting the device itself. Some of them have this capability and some don’t. If you wait for 2s like this it will just make it take 2s longer before you automation runs.
Another idea to test is the automation withoutflash:short parameter under turn_on action.
Automation trace, as advised above, for sure is helpful to debug automations, but if you’re newbie it may be difficult to read and understand.
What I would advise you to do instead is to open the logbook (http://<your_ha_url>/logbook) and filter for motion sensor and light entities that you’re trying to automate (probably in 2 separate browser tabs). Logbook can help you understand how entities state changes over time.