I have a foyer light connected to a smart outlet/switch that I want to have come ON following the rules below:
1) Turn on at least 60m before sunrise
2) OR turn on at 5AM (if more than 60m before sunrise)3) AND turn on if front door opens, optionally and it's dark out... for 60m
Almost seems like a motion sensor would work better.. or camera trigger
One and two can be done through scheduling of the smart switch. You could setup a scheduled rule using a contact sensor on the front door to accomplish number three.