Trigger to exclude 60 min window

I have a date/time variable "Last_Run". I want to have a rule trigger that will only run if the rule has not been run in the last 60 minutes.

I created a trigger that required "Between two times". The first time was Last_Run+60 and the second time was 11:59 pm on 12/31/2099. At first this seemed to work until Last_Run was 2 days ago, late in the day. I then figured out that "Between two times" ignored dates.

I then went to "Between two dates", which allowed me to use both date and time, but there was no option to add 60 to the start date/time.

What am I missing?

One of the things i love about automation is that there are at least 1 million ways to skin a cat. I use private booleans to skin this cat.
ie: if private bool = true
then
set private bool = false
do stuff
set private bool = true delay 1hr
end if

2 Likes

Thanks, I understand your logic, but I think I found a different one of the million that I like better based on setting two global variables during the run.

Last_Real_Alarm is set to current Date/Time, and
Last_Real_Alarm+60 is set to current Date/Time + 60 minutes.

Then my Trigger is:
Alarm Sensor contact reports open,
Stays open for at least 0:00:05 seconds
NOT Between Last_Real_Alarm and Last_Real_Alarm+60

Thanks for getting my mind headed in the right direction.