Pending Cancellation Potential Bug?

Hey all,

I'm not sure if this is a potential bug or a flaw in my logic (or understanding of the 'Off pending cancellation' logic). Here's my rule (no restrictions, so not showing that section):

The goal here is if I turn the Master Shower Mode switch on (it's a virtual switch), the bathroom lights and fan come on, and, the virtual switch itself is used in other automations to disable turning the lights/fan off when there's no motion in the bathroom.

The true case works perfectly, and the lights/fan stay on. The off case works as well - lights go off, fan stays on for 5 minutes, then shuts off. However, I put it in as 'Pending Off' because if the Master Shower Mode switch is turned on again, I would assume that changing the rule state to true counts as 'cancellation', and the fan should remain on for as long as the Master Shower Mode switch remains on.

However, that doesn't happen - when I turn that virtual switch back on right after turning it off, the original 5 minute timer to shutoff the fan keeps going, and the fan does indeed shut off after 5 minutes.

Any help/ideas/suggestions?

Thanks.

It probably should work, but I'm not seeing the whole picture. What turns the virtual switch on, Motion sensors in another rule? If you cancel the 5 minute off timer, the moment it becomes false again, it will start a countdown again and if nothing interrupts it by changing the rule to true and keeping it that way, the fan will turn off in 5 minutes. Bathrooms can be tricky to keep detecting motion.

You mention motion. Here's an example of what I use for my hallway light. As long as there's motion, it'll stay on, but as soon as the motion stops and the light is still on, then the timer counts down.

Thanks - the virtual switch is turned on via an Alexa Skill only. This is an 'override situation' whereby I want the rules for motion lighting suspended while the shower is in use (we tell Alexa to turn on Master Shower Mode before getting in).

I may have simply misunderstood that setting the state to TRUE again (by turning on the switch) was effectively a 'cancellation'. If that's not the case, I'll try to solve this some other way.

Your rule looks fine to me. I would take a look at the scheduled jobs section in the app details (near the bottom of the page)
.

When you turn off the virtual switch a scheduled job should appear there (dont forget to refresh the web page). When you turn it back on, this job should disappear (refresh page :wink:). If that is not happening, I would delete and recreate the rule because something wonky is going on.

1 Like

Thanks for this - it definitely looks like once the rule state is set back to true with the virtual switch being turned back on before the 5 minute timer for rule state false ends, the previous scheduled job is not being cancelled. I honestly don't know whether this is works as intended behavior or not? @bravenel?

I would delete and recreate the rule.

Sorry - should have been clearer - that screenshot was taken after I deleted and recreated the rule.

Unless I'm missing something obvious, this is not the intended behavior. Anything "pending" should be cancelled on truth change.

There is a bug with this. Found it, fixed for next release.

Just noticed something in your screenshot.

What manner of Black Magic is this?
@bravenel please exorcise the demon in his machine.

1 Like

Yeah I saw that too. Thought is was just a glitch in the screen shot.

Nothing to see here, move along :slight_smile:

3 Likes

Moving along...but definitely glancing over my shoulder.
Michael-Cera-Awkward-Stare-Around-The-Classroom-In-Superbad-Gif

2 Likes

This has been fixed in 1.1.4.

Yes, Pause/Resume is now available for Rule Machine, Simple Lighting, and Motion Lighting.

1 Like

First bug found @bravenel.
I realized that for some rules I had to click continue the first time they were opened since the update. So I decided to run through all my rules to get it out of the way now. Some required the Continue click...others didnt.
Then I realized that some of my rules were being renamed to Rule2.5
image

That's why you had to click Continue. Did you give it a chance to update?

Plus, why would you run through all of your rules like that. They all get updated as needed when you open them in due course.

Maybe not. I was just clicking Continue and then Done on the next page. If there's a way to break something...I will find it apparently. I'll take my time the rest of the way through.

Like I said :crazy_face:

I've had a "ghost rule" for the last few updates. There's no way to remove it. Any ideas how to get rid of this?

ghostrule

When you click Continue, it does a page refresh. It's during that page refresh that the name gets updated (try pausing a rule and you'll see why the name got messed with). So if you hit Done too fast, it may not have updated the name, and you end up with Rule-2.5.