Help with Rule and variable trigger and timers

Been scratching my head how to best capture this rule. Thought the "collective" probably has an example to point me in the right direction!!

I have rule with a morning scene that is set to come on at 6AM every morning and run for 3.5 hours. If I don't have an alarm then the world is great.

I have a second rule that runs the same morning scene if the Alarm goes off (IFTTT Alexa trigger).

My issue is the scene turns off at 9:30am regardless of when the the second rule completes 3.5 hours.

I fully understand why. I don't believe a timer can be cancelled, because that would be the easy fix.

Any suggestions? I ultimately want the rule that runs the morning scene from 6AM to 9:30AM or from Alarm to + 3.5 hours.

Thanks in advance!!!!

Post your rule, please.

Actually combined them into 1 rule....

Do you usually set the alarm to go off before 6 AM on MTWTF and before 8 AM on SaSu? Or always after? Or could be either before or after?

You might be able to do something with private boolean.

  1. Your first Action should be: Cancel Delayed Actions

  2. Edit the line with the delay and make it Cancellable

That way when it is triggered for the second time, it will cancel the delay (and any delayed actions) from the first time it was triggered.

1 Like

Just implemented - will try it out


So, how did it work?

Sorry been away this week. Yes it did work!

1 Like

No apology necessary. I completely understand. My wife had a bday this week and my moms been in and out of the hospital. I havenโ€™t done much either. I was just curious how you made out. I am glad itโ€™s working.