1) Give a description of the problem
How would one design a script that sends a notification when a contact is open for 30 minutes during “dark” hours (i.e. sunset to sunrise), REGARDLESS of when it was originally opened (i.e. it could have been opened originally during daylight hours)?
2) What is the expected behaviour?
A notification is sent when a contact has been opened for x minutes of “dark” hours.
3) What is happening/not happening?
My script works fine if the contact is opened during the “dark” hours. But if it is opened during “daylight” hours and then the sun goes down, it never triggers.
4) Post a Green Snapshot of the piston