A Repeat Actions works by running the same action for each repetition, starting with the Repeat Actions action. For a Simple Conditional Action, the condition is part of that action, so it is tested on each repetition. If it is true, execution continues. If it is false, the actions until End Repetition are skipped.
In contrast to that, IF-THEN is it's own action, and a Repeat Actions after that is a simple Repeat Actions, with no condition attached.
Simple Conditional Actions attach the condition to an action. You can see this when you create one, in the way the UI prompts you. You can see it in the result, where the condition is on the same line as the action. You can read about it in the documentation: Rule Machine - Hubitat Documentation.
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?
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.
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.
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.