Sending command to indirectly referred item possible?

I have three rules that are for selecting a scene in a bedroom, setting the lights to hsb-values. Inspired by the rulesDP from Rich I was thinking about combining these three rules into one. Do you think this is possible?

I have a string-Item to hold the Scene-name, and a color item per room.

Here is my rule (which is repeated for the other rooms):

rule “Scenes BR1”
when
Item Scene_BR1 changed
then
var String hsb = “0,0,0” //set variable
switch Scene_BR1 {
case Scene_BR1.state.toString == “WERK”: {
hsb = “30,60,100”
} case Scene_BR1.state.toString == “GEZEL”: {
hsb = “20,100,49”
} case Scene_BR1.state.toString == “DAG”: {
hsb = “45,9,100”
} case Scene_BR1.state.toString == “NACHT”: {
hsb = “27,100,1”
}
}
Color_BR.sendCommand(hsb)
logInfo(“Scene BR1”, “BR1’s Scene: '” + Scene_BR1.state.toString +“', met HSB=(” + hsb +“)”)
end

So I thought maybe I can trigger the rule by a group gScene_BRx (Scene_BR1, Scene_BR2, etc).
Then I can get which item triggered the rule by Member of gScenes_BR. But I have no idea how I can set the Color of the right bedroom: Color_BR1, Color_BR2, or Color_BR3?

rule “Scenes BR’s”
when
Member of gScenes_BRx changed
then
var String hsb = “0,0,0” //set variable
switch triggeringItem {
case triggeringItem.state.toString == “WERK”: {
hsb = “30,60,100”
} case triggeringItem.state.toString == “GEZEL”: {
hsb = “20,100,49”
} case triggeringItem.state.toString == “DAG”: {
hsb = “45,9,100”
} case triggeringItem.state.toString == “NACHT”: {
hsb = “27,100,1”
}
}
Color_BR[1, 2, or3].sendCommand(hsb)
logInfo(“Scene_BR1-2-3”, " Scene: ‘" + Scene_BR1-2-3.state.toString +"’, met HSB=(" + hsb +“)”)
end

See Design Pattern: Associated Items for answer to your specific question.

You can simplify your switch statement a bit:

switch triggeringItem.state.toString {
    case "WERK": hsb = "30,60,100"
    case "GEZEL": hsb = "20,100,49"
...

@rlkoshak Thank you for your hint on the simplified switch statement.
And also for the hint on my genaric question. For me OH is complicated enough, so I think I better stick to this and not use Python. I have enough puzzles still to be solved ;-).