Update status of group members

Hi,

I already know that I can use groups of types switch, send them a command, and the command will then be passed on to all group members. Now I am looking for a similar functionality for only updating the status of group members, without them issuing a command.

Does that exist, or would I have to code it myself in a script?

This would be used in a situation where I know that the statuses of the physical devices have changed, but due to limitations of the used binding their status has not been updated in openHAB. I do not want to issue a command because that would be redundant since in the “real world” the status of the devices already has changed.

Thanks for your help!

That’s why we have with send command & post update two different functions.

It’s described in the documentation

No, there is no way to update a Group Item and have the update flow to the Items. You’ll need to either issue a command anyway, or create a rule that loops over the members and updates them each individually.

1 Like

Hi Matthias, thanks for your response!

Yes, I know about the post update function, but is there a way to use it on a group to update the status of all group members? For send command this seems to work, if I use it on a group or location, all members will receive the command. But for post update only the status of the group will be updated.

I know I can code this myself with a loop or recursive function, but wanted to see if there is a built-in efficient way, similar to the passing on of commands.

OK, thanks, then I will code that myself. :slight_smile:

One observation/question from playing around with this a bit further:

When sending a command to a group with Member Base Type = None, it only works if the group contains only members of type Switch. If it contains a single item of another type, it will not work. However, if Member Base Type = Switch it works even if the group contains members of other types.

Not sure if this is normal/expected behavior, seems to be a bit unexpected to me. What do you guys think?

Probably worth filing an issue about. It should be consistent. Either commands sent to a Group without a type get ignored completely or go to all members, especially since you can send ON/OFF to Dimmer and Color Items.

OK, done:

https://github.com/openhab/openhab-addons/issues/14100