Motion Lighting delayed (but not disabled) by Power Meter

I have an office with a motion sensor near the door. I want to use motion lighting to activate the lights, but while I'm working on my computer the lights will turn off, since no motion is detected.

So I have my Computer's monitor plugged into a power meter. I'm using rule machine to set a virtual switch based on the power meter's consumption range, on and off based on the monitor's state.

So now to the Motion Lighting app; I use the motion sensor to activate, I have a few other light switches kick on and off with the room lights (desk lamp, floor lamp), I set "Delay off" for 10 minutes, and "Disable turning lights off when (computer monitor) is on".

When I'm working on my computer the lights stay on, and when I leave the room I reactivate the motion sensor, which restarts the Motion Lighting app, the computer monitor goes to sleep after 5 minutes of inactivity, turns off the virtual switch, and in 10 minutes of delay the motion lighting app should see the virtual switch off and turn off the lights. Except that doesn't happen. They stay on.

Assuming the app doesn't simply shut down if the switch is on, and checks it in 10 minutes, this should work, right? If the app doesn't run at all with the switch on, I guess I'll have to recreate the same functionality using Rule Machine?

I have a similar scenario in a few other rooms where I want to activate the lights using a motion sensor, perhaps using the motion lighting app, but delay or reset the motion time out based on the state of other devices, eg a power meter in my office, and a sauna steam generator (toggle switch) in another room. I'm using Jasco in-wall motion switches, so my time out limits are disabled in the case of my office, but limited to a maximum of 30 minutes, which is inadequate for the sauna.

Any suggestions?

If I had a bit more brain power I could try to think through your setup :-).... but one alternative that I use is to have any activity on my laptop trigger a virtual motion sensor which is part of a zone motion group (using the built-in app). It's probably not worth changing your setup more than you need to, so what I would suggest is to change your use of a virtual switch for the power being drawn by your monitor to set motion on a virtual motion sensor and setup a zone motion group with the physical motion sensor. Then you can use the zone motion sensor device in your motion lighting rule, without the need for the slightly more complicated logic of using the virtual switch.

Download the Hubitat app