My home has become reasonably smart. But I have a problem: I control the start of various scenes with luup checking for the state of a virtual switch. Works great. But if I change the virtual switch, while the scene is executing, it still goes on happily. Is there a way to tie in luup for each delayed action, or would I have to write the whole scene program in luup?
Delays in scenes are a bit of a myth. When you run a scene with delays, it’s still scheduling all of the actions at the moment the scene begins, just with a sleep() inserted into the beginning. Once the scene is triggered, it schedules these delayed actions and exits. There is no “while the scene is running”, just delays that haven’t finished yet. Hence the behaviour you see.
If you need to check a variable partway through, you have to code the delay yourself. See the many posts on that topic for sample code.