I think you are correct in that if the motion sensor is triggered at 9.5 minutes or less before sunrise the lights will not turn off until the next sunset. The following code should fix that:
If
(
(
Status 'Driveway_Motion1-Sensor' is On
Or Status 'Driveway_Motion2-Sensor' is On
)
And From Sunset
To Sunrise (next day)
)
Or Program 'On_DrivewayLights' is True
Then
Set 'Driveway_LightsPath' On
Wait 9 minutes and 30 seconds
Set 'Driveway_LightsPath' Off
Else
- No Actions - (To add one, press 'Action')
However, I find it unlikely that the motion sensors have been triggered at exactly 9.5 minutes or less before sunrise so many times. Once, or twice I could believe, but this has happened at least 4 days that I'm aware of.
The objective of this code is to turn on the lights for 10 minutes when motion is sensed, but only at night (e.g. after sunset and before sunrise).