You will notice that I’m not an expert with this simple script. What I’m looking for is to be notified if the garage door is open for 30 minutes when it is dark outside (i.e. between sunset and sunrise). It executes if the garage door is opened after sunset, but not if the garage door is opened before sunset (even if it is open all night). It seems to be lacking a trigger in this situation, but I’m not sure how to make that work.
I appreciate your help!