I am running openhab 2.2 on a Windows 10 system with Homematic Actors for light, heating and rollershutters, window sensors and also some sensors for temperarture, energy and motion. Hue lights, Anel switch
The rollershutters in Homematic are two channel actors with short and long buttton press which lead to up/down complete or up/down for the time the button is pressed. All rollershutters are part of a group and I can cycle through all members of this group to bring them up or down.
Now I would like to add a switch for each rollershutter, which will be preset e.g. in the sitemap. If the switch is OFF (or Manu) than the rollershutter won’t be active in the rules and can only be moved up/down with the buttons in sitemap or the real buttons on the wall.
I have been thinking about giving the switches almost the same names as the rollershutters like:
Rollershutter Roll_EG_WoZi_1 "R WoZi 1 W" <rollershutter> (EG_Wohnen, RoWo) {channel="homematic:HM-LC-Bl1PBU-FM:hmHR:LEQ1023052:1#LEVEL"}
Switch ll_EG_WoZi_1 (Roll_Auto_Manu,Roll_Auto_Manu_Wo)
Group:Switch:OR(ON,OFF) Roll_Auto_Manu "Auto All [(%d)]" <rollershutter> //Auto on/off für Rolllaeden
Group Auto_Roller //dyn Gruppe mit allen Rollershuttern auf Auto
And in the rule just add the missing name part in the name, but this is what I fail to do.
//ROLLLADEN
rule "Roll_Auto_Manu"
when Item Roll_Auto_Manu received update
then
Auto_Roller.members.forEach[ item | Auto_Roller.removeMember(item)]
Roll_Auto_Manu.allMembers.filter(s | s.state == ON).forEach[ item | Auto_Roller.addMember(item)]
end
So I would like to manipulate item item.name = “Ro” + item.name
How can I do this?