I want to setup a simple rule to turn off my bathroom exhaust fan 45 minutes after it was turned on, using a smart 3-gang Nue switch I had installed recently. I've included a screenshot of my rule below, showing how I have setup the action to turn off the switch, which is cancellable. My intention is to cancel the action if the switch is turned off before the 45 minutes is up. I could setup another rule to detect the switch being turned off, but I would prefer to keep it self-contained in the one rule. Is that possible?
Make it wait for the condition of the switch turning off with a 45 minute timeout and then turn the fan off.
If the switch turns in the 45 minutes its already off but otherwise it will turn off after 45 minutes.
Thanks for the suggestion @at9. I think I may still go with a conditional logic approach, but am interested to understand the behaviour of what you have suggested.
Are you still suggesting to have the rule triggered by the switch turning on? If so, if during the 45 minute timeout window, if I turned the switch off and back on again, would the original 45 minute timeout still come into play? i.e. if I did this after 40 minutes, would the switch turn off 5 minutes later?
This is what I changed the rule to while you were responding to my post:
Sorry, re-reading your post I see you suggested waiting for the switch to turn off, I'm assuming that would in effect cancel the 45 minute timeout, ignore my previous question.
Thanks @Hasty1. It's funny, I watched Bruce's KISS segment and didn't even twig that I could have used it for my fan. That said, I still lean towards the IF-THEN-ELSE structure, I just feel it reads better for some reason. I completely understand yours / Bruce's solution, but just feel mine is a bit more explicit somehow....
I agree because I tried it.
I thought it would act like a button event and retriever the rule if on was pressed again.
Nope - doesnāt happen. You have to cycle off before the rule will trigger from another on event.