Switch items, one real, one fake, act as one

I have a zwave relay controlling my central heating (boiler) system.
While making the rules, I had a switch item called pretend_central_heating that I would use as a guide to manually turn on the heating system when the pretend switch was flagged.

Now I’m fairly confident that it’s working I’m going to change over to using the actual central heating switch.

Is there some change I could make in all my rules, where instead of replacing pretend_central_heating switch with the actual central heating switch where both could be used?

I assume its a group I’d use. But basically for all the rule checking and actions, the state of both items will be identical.

The advantage is that if I find it not working, I can remove the actual switch from the group and it will stop being controlled.

Is this possible?

@rlkoshak and I have been discussing this lately, so I “@-ed” him in case I make some mistake in this reply.

With groups, your only operative rule trigger is “received update”. A group cannot respond to a “changed to…” or a “received command XX” rule clause.

So (AFAIK), as long as you have only a few options, you should write your rule when clause as (sorry, the code formatting option seems to have disappeared from this UI):

WHEN Item Central Heating OR Item Pretend_Central Heating <changed to> OR Item Central_Heating <changed> or < changed to X> OR <etc> THEN

But if you’re correct and I can only use it for receiving state, then I couldn’t say
upon other condition

I’m not real certain what happened when you postUpdate to a Group. I can see one of two potential ways it could be implemented. It could either work the same way as sendCommand and it will postUpdate to all the members of the Group. That would be consistent with commands anyway. The other is that it just updates the state of the Group, which would also be consistent behavior, only it’s consistent with the way updates are processed by items.

I’ve never encountered a use case where it ever made sense to postUpdate to a Group. I’m not saying there isn’t one, I’ve just never thought about it much, let alone tried it myself.

But from what you describe in wondering if a proxy item would be a more appropriate way to get the behavior you are after.

Actually you can trigger on a change to a Group. The problem is that the Group’s state doesn’t necessarily on every change to it’s members. For example, if all the Switch members of a Group:Switch:OR(ON,OFF) are OFF and one of them turns on, the Group’s state will change and changed rules will trigger. However, if another one turns on the Group’s state remains the same so the changed rules will not trigger.

This can sometimes be useful and desirable, see my generic presence detection tutorial for an example. But often it is counter intuitive to newer users because they expect the Group to generate the same states as it’s members.

The only trigger that is almost never going to be useful with a Group is received command because I don’t think Groups ever actually receive commands, they just forward them.