Prevent a Scene from Running, Only If Called From Another Scene

Was wondering if I could get some suggestions on how to prevent the following scenario.

Scene - Trigger
Scene Day On (Lupp filtered to only run during day) - Motion
Scene Night Off (Lupp filtered to only run during night) - Motion
Scene Off - No Motion or Light Switch Off

A problem happens if motion turns light off, and I’m still in the room, and I quickly cause motion…the Scene Off fires once on No Motion, and once when the light turns off from that scene (running the scene twice). If I don’t stay still while the lights off, I’ll get the order of Scene Off #1 from No Motion → Scene On from Motion → Scene Off #1 from Light Switch Off (switch turned off using Scene Off).

Can I filter via Luup if being called via specific scene X (Scene Off)? Does the calling scene a variable somewhere in Luu?

This is a WAF issue of making it appear unreliable.

That’s what Sequence expressions in PLEG are designed to filter out.

Perfect, I did not think of sequences. I’m currently not using PLEG though since all my logic is built on the armed motion (which currently is working on my UI5 with PLEG). This allows me to selectively turn on and off motion per room via the Vera interface and Tablet apps. If I can maybe get the fix for that? I’m a bit worried that it will void my Vera support though :frowning:

At least I know there is light at the end of the tunnel when I convert to PLEG (and get a speed boost too).

Thanks Richard!