I'd say there is a bug around this option. From my little test, it actually turned the light off when motion became active, which makes no sense at all. I'll look into it.
I take it back. This does work as expected (I had too many automations banging on one light).
Here's the test case:
And here are the logs from this sequence of steps:
- Light was turned on manually (from its device page)
- Motion became active
- Motion became inactive -- light was not turned off
- Light was turned off manually (again from device page); this is how the "Don't Turn Off" state is cleared, so that the ML app works normally.
- Motion became active, and turned on the light
- Motion became inactive and the light turned off.
Nowhere in this topic above did anyone post the logs to show what happens. ML makes extensive log entries to show exactly what is going on. Logging is your friend! Use it, you can see what causes most problems that way.
And btw, tag me for app issues,
For this automation feature to work -- Don't Turn Off if Already On -- it is critical that the device actually reliably reports being turned on. I hope that's obvious. The app can only respond correctly if it knows the device is on, and that happens from the app's subscription to the switch.on event from the light. Some devices don't report reliably. In that case, this can't possibly work as expected. So be certain the device is actually reporting on and off events as it should. Usually, when these sort of things don't work as expected, it's because the device is flaky. And usually, that will be due to a flaky device or a flaky mesh network to the device. Either is fatal.
How can you tell if the light is reporting reliably? FROM THE LOGS!
Interesting side note: If you look at the last two steps in the log above you will see that the light took almost 3 seconds from being commanded off to reporting off. This particular light is a Z-Wave dimmer that is outside, and it is a very slow to report device. Usually, it's just turned on at sunset and off at midnight, and it doesn't matter if it reports promptly or not. But it just goes to show that this thing has a weak mesh. A little weaker, and the app would have failed, even if the light actually turned on. If that report doesn't get back to the app, no good.