Delay off issue

Got an issue with a delay. I've had this rule for many months. In fact since RM 2.5. I have this rule setup that will trigger when my TV is turned on. Delay 4 hours then turn off. As you can see from the log, TV was turned off after only 43 mins. Any idea why?

Was the TV turned on earlier in the day and manually turned off?

3 Likes

Wouldn't you want to have a cancel on the delayed off so that if you turn the TV off prior to the 4 hours it would cancel the scheduled action?

2 Likes

Yep, you have two instances running concurrently.

1 Like

Here what I changed. Like this

Something more like this. The trigger should be 'changed' so that the rule will run when the TV turns off as well, that is what will cancel the delayed action.

2 Likes

I just noticed that the name of your rule is 'Power Allowance TV'. Are you trying to restrict how much time someone can watch TV? Like a child. If that is the case my solution won't work because the timer will get reset each time the TV is turned off.

1 Like

And you need it to be reset...otherwise you only get 4 hours from the first time the TV is turned on, the issue that was first reported.

That said, you really only have two choices...either the timer is persistent and doesn't automatically reset itself, or it does reset itself when the TV is off and then begin again when the TV is turned back on. There is no other options available, unless you want to have a timer that is triggered by some other means, like a virtual button or switch.

With the latest RM is created (see above) this did not work. I tried turning on TV this morning and it instantly turned off

That's because the first thing you do is cancel all timed actions. That will cancel your delay. The rule triggers are also incorrect. See the post later in the thread for the correct way to implement this rule.

@Ryan780

Like this?

1 Like

yes.