RM4: Air conditioner rule

I have seen all the RM4 hoopla but had not had the time to dive in.
So I thought i'd update my simplest rule and have failed.

RM3:
Rule when bedroom air con (virtual switch) is true, turn on bedroom thermostat (sensibo)
When bedroom air con is false, turn off bedroom thermostat.

RM4:
So i setup the rule in RM4, but couldn't see how to set a rule so used a trigger, but I dont want to setup two triggers to do the one action...

So I got here,
trigger 1: Bedroom air con VS turns on, action turn on bedroom thermostat
trigger 2: Bedroom air con VS turns off, action turn off bedroom thermostat
BUT - why on the rules pages is it listing my air con false and my thermostat true when it should read air con false and air con true ? Or is that a suggestion?


This below rule, when the air con VS turns on, the thermostat turns on, then 4 seconds later turns the thermostat off and leave the VS on.

@bravenel

What you want is this:

Trigger: 
    Bedroom air conditioner *changed*
Actions:
    IF (Bedroom air conditioner is on) THEN
        On: Bedroom thermostat
    ELSE
        Off: Bedroom thermostat
    END-IF

Im going to say "yes" @bravenel - but id need to make it and test it to be sure.

So I dont need an action, but the below were conditions ?
I set the conditions, but when I turn the VS on, the sensibo turns on (and stays on) but when I turn the VS off, the sensibo doesnt turn off.

You need the actions. Those conditions are just available to you if you make Conditional Actions, such as the IF-THEN you need as I showed above.

If you start from scratch with what I showed you, you will discover when you go into Actions that it will already have a condition of Bedroom air conditioner is on -- the one you need in the IF-THEN. It will have been created automatically from the trigger you use: Bedroom air conditioner changed.

is this how it should look @bravenel
Because this doesnt work. the VS changes, the sensibo fires, then 4 seconds later fires again and turns off.

No, the actions should look like I showed you above:

    IF (Bedroom air conditioner is on) THEN
        On: Bedroom thermostat
    ELSE
        Off: Bedroom thermostat
    END-IF

I think I was thinking "actions" being //Control Switch, Push Button.
But you actually mean "Conditional Action" .. which is WAY SCARIER..cause this means I know nothing, when I just got my mind around RM3 lol.
Yeah this works, omg im screwed now lol

@bravenel @patrick - I think maybe because a lot of you guys are from programming / coding backgrounds and are on the other side of this - the above makes perfect sense to you.
But as a UX/graphic designer, the below is the KISS version for me.

Define Rule: Bedroom air conditioner (currently false/off)
Actions for True/On - Turn on Bedroom Thermostat
Actions for False/Off - Turn off Bedroom Thermostat

@bravenel demonstrated on hubitat live how you can always keep rm 3 rule building available.

My comments can be used for discussion moving forward for lay people as Hubitats user base expands from HA purists to the masses perhaps.

The perfect example is this rule. It should be the simplest of simple - but its (agreed I am finally around RM3) taken me 3 replies from the creator and close to 90 minutes.

Yes - i can clone this rule now (I just did with the copy I need for the livingroom, but even then it was hard to work out how to edit the conditions).
Yes - you can say HE has a steep learning curve but the results are worth it (they are).
Yes - I am very happy with HE, I like reading, learning and experimenting with all things HA and think HE is a winner for me..

BUT - RM4 is not, lay person, for the masses friendly, "really" a KISS standard.

1 Like

The possible glitch here is that what you are presenting is somewhat limiting. The main goal of 4.0 was to get away from the strictly true/false mentality. If it was just simply IF THEN and ELSE, then you'd have

IF (condition) THEN = True statement
Else = False statement

The ability to stack ELSE IF (condition) gives a lot of subtle shading to what is true vs false. The example above is very simple and supports a binary view. Below is my shower light app:

If you ignore the complex routine for when I take a morning shower, and look at the below, there are several variations of what can be "true" based on mode and a motion sensor changing. And this came from my wife. She wanted the light at certain levels based on how bright it was outside. So, it's not a "geek" requirement.

I agree that the UI could use a bit of spiffing up. The challenge I think is how do you offer a level of power and customization while making it reasonably simple to wield it. Wink, Stringify, SmartThings and HE are all examples of trying to attack that very problem. HE is the most robust and will grow, but it's a really tough thing.

1 Like

100% agree and by no way do i want to cut the legs off the idea.
But to me, that rule you have exampled is an application, not a typical HA rule (typical).
I love that HE has the depth to do exactly what you want, and maybe one day I might achieve such a fat and tasty rule, but atm - I just want my GD aircon to turn on and for it not to take 90 minutes to work out how to code that lol.
My preface is this was my "simplest" rule to tackle - but it wasn't simple to achieve (to me).

Right Right. Bruce gave you quite a but to work with. Once you get the hang, then rules will come flying out with the greatest of ease :-). Like anything else, it just takes a bit of practice.

1 Like

I understand your point completely. What's interesting is that some people, like you, get the concept of your simple rule with true/false actions right away, and have no problem thinking that way. Others just don't grasp it at all and have real trouble with it. Some, also like you, have more difficulty with the 4.0 rule I showed you.

What to do about this quandary?

One idea is to keep the old true/false rule around in 4.0, to incorporate it as an option. I've been thinking about how to do that, and it is a possibility.

2 Likes

Please treat my replies as thought provoking and nothing else.
I will come around to 4.0 like @homeauto2112 said, it is just a time thing.
If you removed true/false and put on/off like I had (I just had to tell my brain when it sees false that means off) that is the bridge for both people to know the Truth, behind the rule - if you will.

I guess I am time poor, and not that great of a programmer. But, this community will drag me through my continuous posts until I get my head around it :slight_smile: