I am working on consolidating some rules. I've come across this
So for me to use the Command only switches that are off/on, do I have to make 2 seperate rules, 1 ON and 1 OFF?
If I do it this way, the switch is going to be triggered ON or OFF every time the sensor changes. Not what I had in mind. I don't see a way to use it with conditional triggers.
What are you actually trying to do? And do you need to use this option at all? Generally (if the device reports its current state reliably), sending an "off" command to a switch that already reports as off has no effect. But knowing what your goal is would help answer this question.
Well.... I'm probably over-thinking this, but I noticed a large amount of activity in the logs, where it was saying switches were being turned ON or OFF when they were already reported in the same state. I really don't have a problem with that unless it is causing a lot of unnecessary trafffic on the hub. That's what I was trying to reduce. I guess I assumed that was the reason for the "Command only Switches" option...
That option doesn't exist on its own; it's only found in a rule action, one that turns switches on or off, and is only applicable to that action. It will not affect device behavior outside the rule or even in other actions in the same rule. If those events are not occurring as a result of a rule action, nothing you change there will help.
Without a specific example of what you're doing (presumably you took that screenshot from something you were doing--maybe one of thee actions in an actual rule?), it's hard to say more about your particular case.
Using that screenshot from above. Every time the temperature sensor changes >33, it's going to trigger the switch OFF, correct? I'm thinking that is a lot of triggers. Is that not how it works? (the switch will be OFF all summer.
Back to my self assessment - am I just over-thinking the traffic being created by every time it tries to turn OFF something that is already OFF?
What screenshot? The rule you showed has no actions, which is the only place you could find this option.
Without actions, your rule isn't going to do anything at all.
Regardless of the above: a command will generate whatever traffic necessary to send it; the device or driver may also cause additional traffic after that to report state, even if nothing changed, though that depends on the device and driver (and generally the protocol and device behavior). So if this is a concern for you, enabling the option might help reduce such traffic.
Yeah, that was just the beginning of the rule. So I am trying to combine 2 rules into 1 – The ON <32 and the OFF >33, and keep from having a switch that is already OFF from being turned OFF repeatedly, which is what the logs for that device seem to suggest. I just thought to ask for help before I got too far down the rabbit hole. Perhaps I should just keep them 2 separate rules. Especially if sending an OFF to an already OFF device is not causing any harm.
I still think seeing the actual automation you're trying to create would be the best way to get the most specific answer, since your trigger events don't tell us what you actually want to do when and it's not clear to me from the description. In this case, that could mean sharing the two existing rules you have.
But here's my preference: fewer rules aren't inherently better, and two simple rules are better than one complicated rule because they're easier to write and read or troubleshoot. So, if you already have something that you know works, I'd say keep it.
Which is what I'm going to do. I have 2 simple rules. One turns on a water heater below 32 degrees, and one turns it off above 33 degrees. Has worked for years. I thought maybe combining rules like this might tidy things up a bit. Then I saw the "Command Only When (ON/OFF)" and thought what a nice concept to eliminate a bunch of unnecessary traffic. Again, maybe over-thinking and not really sure why this "Command Only When (ON/OFF)" exists...
If you have this option enabled and are turning off (or on) a switch in that rule action, it will skip over that device if it's already reporting as off (or on). This can reduce traffic, as mentioned above.
If you have this option selected on multiple actions, the outcome would be the same for that action regardless of whether both actions are in one rule or one action is in two each. But it's again hard to say anything about your specific situation wutout seeing the rules.
Perhaps you could add a conditional to the rule’s trigger that the unit is ON as well as above 33 degrees – that way the rule (and it’s OFF action) would only be triggered once when the temperature is above 33 instead of all the time the temperature is reported like it is now. Ditto for the ON rule. I think there's where your traffic is coming from.