I have a piston working fine based on motion and time of day.
At the end of the code I want it to shutoff the light after sunrise or 6am. Based on TraceLog the code doesn’t fire to evaluate the if 6am statement. If I walk outside causing the motion to trigger and it’s after 6am the code trigger and the if 6am passes and the light is turned off.
My question is there something I need to do to cause the code to run periodically so the if 6am is tested without requiring me to walk outside.
Blockquote
///* Exterior Sconces *////* Author : Jim // Created : 11/20/2018, 2:22:58 PM // Modified : 11/20/2018, 9:00:30 PM // Build : 6 // UI version : v0.3.108.20180906 *//**************************************************************/ execute
if
Any of Motion - Driveway’s or Motion - Front Porch’s motion changes to active
and
Time is after sunset
then
withExterior Sconcesdo
Set level to 100%;
end with;
end if;
if
Any of Motion - Driveway’s or Motion - Front Porch’s motion changes to inactive
and
Time is after sunset
then
withExterior Sconcesdo
Wait 30 seconds;
Set level to 10%;
end with;
end if;
if
Time is after sunset
then
withExterior Sconcesdo
Set level to 10%;
end with;
end if;
if
Time is after 6:00:00 AM
and
Time is before sunset
then
withExterior Sconcesdo
Turn off;
end with;
end if;
end execute;
Edit