I need some clarification here (please) on how events and luup code interact in a Scene:
I have a simple Scene with an Event set to trigger if the brightness from an HSM100 < 60 (getting dark)
The command is to turn on a light switch.
I added Luup (Lua?) code to return “false” if the current time is before or after a certain “active” time
The “active” time code works - the light never changes except during the active time
BUT the Event test of “< 60” does not appear to work, the scene executes (ie triggers the light) any time during active time that the HSM100 light value changes, as if the change in value triggers the scene rather than the Event test of “<60”
Example: we enter the active time, the light value changes from 100 to 98, bam - the light goes on!
Question(s): Is this behavior correct? Why does a change in the tested light value constitute an Event rather than the actual Event test of “< 60”? Or… am I dumb and doing it all wrong? :-\