Rule not working

Hi, I had this rule working (I think) where when my door opened it then turned my heating off after 15 seconds in the hallway and off after 17 seconds upstairs. When the door closed it then turned the heating back on after 5±4 minutes. It doesn't seem to be working now. Can anyone help, is it possible that it never worked and I didn't notice? Any help appreciated guys

It looks to me like when the front door is opened the heating should turn off; however, if you open or close another door then the heat will turn back on. You might want to change the IF statement to include any of the triggering doors opened and change your ELSE to an ELSE-IF all of your triggering doors closed.

Thanks @pseudonym. Apologies for doing this from my phone. See the rest of my screen shot which contains the remainder of my rule. I think it already incorporates your suggestion. Do you think my rule should work. If so, I'm wondering if it's corrupted and I should start again. Any thoughts?

Sorry but I can see anything beyond the first IF-THEN-ELSE.

sorry, I forgot to attach @pseudonym

@stueyhughes I'm still seeing the same issue. Walking through the rule, if the DOOR SENSOR FRONT DOOR is opened it'll meet the THEN condition of the 1st IF-THEN and turn off the heat. The problem is it'll also meet the ELSE conditions of the 2nd and 3rd IF-THEN. The 3rd IF-THEN will cancel the delay of the 2nd and turn on the heat after a 5 minute delay. Turn on the logging and you should see this happening. Another thing is the last END-IF. I'm not seeing the reason for it being there and could indicate a corruption in the rule.

Hi, so heres my rule now in one place. I've removed the END IF. So do you think the solution is to change the 3 ELSE's to 3 ELSE IF's. Also just another question, so does a "cancel delayed actions" just cancel the actions within the IF BLOCK or does it cancel actions for the full statement. In my case cancelling actions for all 3 IF blocks? Once again, cheers for your help

@stueyhughes the "cancel delayed actions" applies to the entire rule. Since these IF-THENs are independent from one another but could be impacted by any of the "cancel delayed actions" I would just break this into three separate rules. I also think your On need to be cancelable to account for the door opening again.

That's great advice. I've removed the CDA's and the rule now works ( not as I'd like). So it's the CDA's which are creating the issue. I truely thought the CDAs only applied to their respective IF block and not the whole statement. I'm still learning! Logically, surely they should only apply to their own IF block or HE should give the option of whole statement or own IF. Interesting hey!

@stueyhughes Can you post a screenshot of your updated rule? I still think you need the CDA to account for the door being reopened.

Hi, see 2 rules (ignore the paused bit) i've now tried both of them without the CDA's and they pretty much work. One is with ELSE IF's and the other with ELSE.

Oh and there is a subtle difference regarding phone presence too

@stueyhughes I'm still seeing something concerning. If you open the front door you will schedule an off for Heating Hall and Heating Upstairs but you will also schedule an on for Heating Utility and Heating Kitchen. When the front door closes you will schedule and on for Heating Hall and Heating Upstairs and you will schedule another on for Heating Utility and Heating Kitchen. Having multiple on scheduled isn't an issue but you could run into a case where you think the system should be off but it turns back on. Again, I would recommend three rules to control these independently and use CDA to cover a door being reopened before the delay is finished.

Once again, thats sound advice and truley noted. Thanks for your support and time @pseudonym. Really appreciate your input....