Sorry for such a basic question, but Iām missing how to do delayed off in RM 3.0 like the 2.5 example here.
Exactly the same way. The Delay is attached to the Switch Off action.
So if my action for True is switch on, true should also continue off with a delay?
thanks for the explanation i can see it now. So would this work?
if in party turn on and whilst its ON repeat.
Aw is this what a nested IF is? So no?
I find the new IF THEN functionality extremely useful, thanks for bringing this to us!
However, I have now quickly found that it would also be really helpful to be able to nest these. Are there any plans for adding support for nested IF THENs in the future?
Not any time soon.
Speaking of IF THEN, I found what I think is a bug yesterday with inserting a new IF THEN before another IF THEN in a rule.
Consider this rule:
Then try to change this rule so that the first action is inside its own IF THEN. Inserting the IF THEN before the action is working as it should:
But, I now cannot insert the END IF. The option is not there:
The way around this is to first delete the existing ENDIF, then I can insert the first ENDIF, followed by the second ENDIF:
Don't worry about what this rule does. I just used some random actions to cobble together an example that would illustrate the bug.
@bravenel I just found the same thing with my rule i moved the IF to the top and i couldn't add a END IF until i deleted the other one at the bottom.
I don't understand this at all. If party mode is false, you are setting it to true, then you have another if looking at whether party mode is true or not. That doesn't make any sense.
I assume you have some other function to change the variable of partymode back to false at some point? Otherwise it's going to repeat forever.
Also, why would you turn on your chandelier to 100% if you are going to be away? I don't get that either.
As soon as you did that you created a nested IF THEN. Those are disallowed. Now you can see one reason why.
So should you not then prohibit inserting IF THEN in to a rule that already contains one IF THEN? Otherwise you will potentially end up with a nested one (even though you didnāt want one, like me and @BorrisTheCat ) as you cannot insert the required ENDIF.
It's very difficult to completely police what you do with editing the actions. This isn't a compiler that is checking the entire list of actions for everything to be right. We do prohibit you from entering and IF-THEN once you've put one in, after it. But the effort to do what you're suggesting is beyond the scope of what is implemented. Just follow the documentation.
this is the UI its if IN party mode turn ON light and set variable to true. Then the simple condition does the repeat as long as that variable is true.
the false part of the main condition does that
this comes from the ST days when presence was very flaky and the house used to change when i didn't want it to. Then the switch stopped working. Although i could now remove this its in there so that no matter the mode the manual switch will always work.
anyway it doesn't matter because it works perfectly !
In my set up it was a if then , end IF then another If then for another condition then end if, which is not nested though, but it still didn't let me do a end if. But again this might just be because i was using insert action before and maybe it was blocking me because it thought i was trying to nest them?
It's sensitive to context to some extent. Editing actions like this is much simpler if you just delete the action you want to change, and then put it back in where it goes. Or, better yet, write the actions down first and put them in with the right order.
Does this fall into the "measure twice, cut once" rule of thumb?
were not all as good as you
actually in this case it was fine in my original setup of this rule, i just needed to move it with how i now used the rule.
i agree and this is what i ended up doing i was just using the previous bit as a reference rather than writing it down , hence how i found it and let you know but if it's there for a reason then its all OK.
@bravenel would a wiki style page of RM ārecipesā be helpful? I would think it would benefit everyone, I know it would me. Maybe break it into sections depending on what the rule would oversee. Easy to complicated, lighting, motion, etc. This way there would examples for users to follow to set up their own systems. The recipes could be posted with ādevice type motionā or āmusic playerā etc and then be adapted to each users individual devices, or used as a guide to get a rule set up correctly. This would also serve as a ābest practiceā for creating rule machine rules. This might also give a user inspiration to automate something that they hadnāt thought of, or even know was possible.