I'm not sure what the actions for false are doing? It looks like a dup of the actions for true, except with different temperatures. I'm not sure how it would ever be triggered?
In theory, the rule gets triggered every time the room temperature changes.
Then it will evaluate whether it is between 8AM and 10PM. From there, it will choose whether to set the true or the false temperatures. I'm guessing he likes it about 2 degrees colder while he sleeps.
Oh DUH! I wasn't thinking of the condition. Got it! Thanks!
I'll go bang my head against the keyboard now.
I don't think this is your issue, as a switch that is already on shouldn't do anything if it gets another "on" command... but it would probably be better in general if you changed your off and on lines to be conditional actions to see whether the outlet needs to be adjusted.
So for the "On: Downstairs South Outlet" it would be a simple condition action of if the outlet is off, then turn it on.
Thanks, I'll try in the morning. It's bed time now.
I honestly haven't used an else-if yet, but it doesn't look right to me. Specifically with the way RM has it tabulated looks like several of your else-ifs (and your initial if) don't have true actions.
Does it work? Again, going just by the way it is tabulated with no experience, it looks like you are trying to nest an else if under the true portion of the if statement. I don't think it works that way.
I think it would have been better to use a simple condition as the conditional action.
I created a new triggered rule using all of the good ideas in this discussion, and came up with this. It came on as expected. I'm still waiting to see if it will turn off, but I expect it will.
the trigger "feels" excessive to me...
trigger on 76.1, 76.2, 76.3, 76.4, 76.5 for nothing.. all those triggers cause an evaluation that results in "on".
Same the other direction.. every hundredth of a degree is a change.. up down up down down down up down up up.. sheesh
Temperature >76 is one trigger, temperature < 71 is another.. skip all the in between "noise", is my thinking.
I guess I'm not understanding the noise? I have mine triggered to come on at 73 and turn off at 72 between 08:00 and 22:00 and come on at 71 and turn off at 70 between 22:00 and 08:00. Unless I'm not understanding how the trigger works?
In the example image:
The trigger is changed for the selected events. Every time there is a change, the Rule portion (Conditions) get evaluated.
The temp in that paste is 76.64. 76.65 is NOT and therefore is a change Then the "basis" becomes 76.65 and if the temp goes to 76.64, it's another change. Presumably the temp sensor has some hysteresis and will only send a message on 5% change (for example) but the point is, every report by the temp sensor is likely to be different, a change.
It's not 'wrong' -- just feels 'too busy' for my eyes.
It’s temperature on a motion sensor and it only reports 4 or 5 times per hour. I guess I’m not understanding why that would be excessive? If it were a thermostat maybe…
I could have two triggers, one for > 76 and one for < 72. But wouldn’t it still check every time the sensor reported the temperature?
Just an update - so far this rule is working correctly. I've tried it with simple conditions and it has a problem turning the outlet off. It turns it off and the outlet turns back on immediately. I removed everything else from the outlet with the same effect. I may try simplifying it in the future if I can figure out a better way but for now it works.
I think that may be due to a bug. I've seen people discussing in forums that their conditional actions aren't triggering correctly with this release. I haven't personally seen a thread where staff confirms the bug, but users say it is being worked on.
I don't quite see how your rule is working the way it is, but I'm glad it is!
Hi csteele! I get (or at least think I get) what you are saying, but wouldn't it have to be a regular rule, not a trigger, in order to cut down on the noise?
As a regular rule it would only run the action once if it was greater than 76, when the rule turned true, versus right now as a trigger running every time the temp changes. But I think putting "greater than 76" as a trigger will still cause the actions to occur every time the temp changes above 76.
I've been staring at it trying to figure out how it could be written as a single regular rule, and I can't come up with anything. I can see two rules... one for on if above 76 and in home or evening, and one for off if below 71 or not in home or evening. But then you have the choice of if you prefer 2 separate rules without noise, or one trigger that is running more often than it needs to.
Csteele's comment has me wondering if both of you would be better off with multiple regular rules that don't trigger unnecessarily or the one noisy triggered rule path I've led you down. I'm having trouble deciding which I'd do... I've been consolidating my rules, but I also don't like inefficiency Hubitat is a powerful device, so I'm not sure if it would rather load multiple rules or be triggered more often than necessary on a single rule... but my guess is it could care less.
I think both of you have a pretty good idea of what is going on and can probably choose for yourselves.
But while I was staring at your rules pondering what I would do, I did notice something that would bother me. Both of your rules only trigger on temp change, not on the condition. So for Tom's, if the time changes to 8:00 or 22:01, the rule won't adjust itself until the temp of the room changes again. And jabecker, if the fan is on and you leave the home/evening modes it won't shut off until a temp change causes it to trigger.
If that bothers either of you, you could throw in additional triggers. Tom, a trigger for time is 8:00 and a trigger for time is 22:01. And jabecker a trigger for mode change (or if unavailable, a trigger for each of the modes).
Have a great night!
@AndyM ... funny thing... I just now noticed that when my mode changed and the fan kept running. So I added mode change as a trigger. I also split the temperature trigger. This is what the triggers look like now:
I’m not convinced that HE would be doing less work with more, less complex rules vs fewer, more complex ones. I’m not sure why it cares, given that it’s all running locally anyway.
From what I understand, the real bottleneck for Hubitat is the talking to devices not the internal processing. So I think, though possibly inefficient, you are OK. While the triggered actions may run more often than necessary, you have conditions built in so it only talks to the device if it needs to be adjusted.
By putting in csteele's suggestion, you have at least stopped the rule from running unnecessarily when then temp is between 71 and 76.
Updating the firmware to the newest version (126.96.36.199) fixed the issue with the simple conditions that I was experiencing.
For anyone wondering what solution worked for me, here is what I have:
I have added the time triggers as recommended by AndyM and have not had any problems with this rule. To be clear to avoid some of the frustration I ran into you need to be running firmware 188.8.131.52 or newer to both allow "change" to be selected in the trigger rule (added in 2.1.1) and to resolve the issue with Simple Condition Actions (fixed in 184.108.40.206).
I want to thanks everyone for their help with this!