I know that the tilt sensor is triggering the script, on the dashboard the light indicator turns on, but the actual light does not. If I test the dashboard control for the light it works every time.
I don't understand why I can turn on the light via the dashboard control but why the script is not working, yet it shows the light on.
I tried your suggestion of >0 and get the same results.
It's not an issue with the script, but the light control not working correctly with the srcipt.