Groups ... if state in group1 execute action in group2

I want to comtrol my rollershutters by rules and would like something like:

Physical Item 1:
item a = shutter (gShutters)
item b = automode (gAutomode)

Physical Item 2:
item a = shutter (gShutters)
item b = automode (gAutomode)

and so on…

then my rule shall send Down to gShutters if the same pysical thing has Automode true in gAutomode

is it possible to send a command to a group and check the state of another item related to the same thing as condition?

thanks !!

It isn’t clear to me exactly what you are asking for. Is it something like Design Pattern: Associated Items?

Well

  1. I have a group of all rollershutters to send e.g. a DOWN to the group

but

  1. my government (wife) wants the possibility to dyncmically exclude blinds if the command is send to the group.
    therefore I created a helper item for every blind “Switch shutterbedroom_automode”

  2. If I create a rule e.g. move all blinds from the rollershutter group DOWN at 11pm BUT only if the helper item AUTOMODE is true for that blind :slight_smile:

hope this explains it a little better

Then the DP applies. Name the helper Items so you can construct it’s name based on the rollershutter name. Then in the Rule you can do a Group operation along the lines of:

Rollershutters.members.forEach[ rs |
    val override = Overrides.members.findFirst[ o | o.name == rs.name+"_automode" ].state
    if(override == OFF) rs.sendCommand(receivedCommand)
]