Why doesn't a timeframe count as an event?

I’m trying to set up a routine to check if my son’s light has been turned down for bedtime. Webcore tells me the piston doesn’t subscribe to an event. Why doesn’t this count?

The ‘only when’ section is a restriction that prevents execution when an event triggers the piston. It doesn’t create any events in itself.

Have you tried the piston with a simple ‘if’ section instead of the ‘only when’?

In order to have the piston yell at your son every five minutes until he turns off his light, you need to A) change the “only when” to “if”, B) move the “do” block into the “then” block of the “if”, C) move the wait outside of the “if/then” block, to the end, so it runs regardless; D) after the “wait”, add an “execute piston” statement and have it execute this exact piston again. It will run every five minutes, checking your son’s light level during those times, and yell if true.

Foul

Also be aware that any time the conditions are met the piston will re-trigger. That means you might get a rather rapid repetition of the warning in spite of the Wait at the end.
You can try changing the Task Cancellation Policy on the With statements to “Never cancel” or you could set a variable to true, set it to false after the five minute wait, and not repeat the warning if the variable is true.