Dealing with hues scenes with "-" characters

Working on adding new hue scenes to my site map which i have done previously through a switch / mapping item tied to and item channel

Group item=Scenes{
            Switch item=Scene_TopFloor label="Scene" mappings=[26MVzMPQmgyKZ7h='Tropical twilight',ikT2kxa59TLhrrt='Arctic aurora',FnEw2R5ArfrfG5g="Spring blossom"]
       }
String Scene_TopFloor   "Top Floor Scene" {channel="hue:group:ecb5fa037852:2:scene"}

However some of my scenes on my new hue hub ( I hit the bulb limit) have “-” characters in them.

openhab> hue hue:bridge:ecb5fa037852 scenes
Id is "R2TswjTWTJpqBEY" for scene "Arctic aurora (Office)"
Id is "gQDOdp9LR9Wf6Mi" for scene "Energize (Office)"
Id is "HSw7h4fWkeQGeYz" for scene "Galaxy (Office)"
Id is "NIsIHmU9x3awl03" for scene "Glitz and glam (Office)"
Id is "oxXbRPzyBk4t8jE" for scene "Mountain breeze (Office)"
Id is "58bbDcbalbgqy8M" for scene "Ruby romance (Office)"
Id is "QVEPE5UdMOkiCGc" for scene "Savanna sunset (Office)"
Id is "sPiZD4M7VMDjJbd" for scene "Spring blossom (Office)"
Id is "uEiqgGkNz7SNwPP" for scene "Tropical twilight (Office)"
Id is "ikT2kxa59TLhrrt" for scene "Arctic aurora (Top floor)"
Id is "aimGUfeHE01CRBM" for scene "Bright (Top floor)"
Id is "-T6495kFTaPesGB" for scene "Concentrate (Top floor)"
Id is "F1LB3dM67Z0zxRS" for scene "Energize (Top floor)"
Id is "kx-HN5yKSnz1Uwv" for scene "Galaxy (Top floor)"

I believe you might be able to link the sitemap scene to a rule and pass that to the chanel as a work around but this seems like a messy solution. is there a better method for dealing with these dashes?

  • Platform information:
    • Hardware: raspberry pi
    • OS:x
    • Java Runtime Environment: x
    • openHAB version: 3.3

You have to use quotes on both sides for this case.

Group item=Scenes{
            Switch item=Scene_TopFloor label="Scene" mappings=[26MVzMPQmgyKZ7h='Tropical twilight',ikT2kxa59TLhrrt='Arctic aurora',FnEw2R5ArfrfG5g="Spring blossom","kx-HN5yKSnz1Uwv"="Galaxy"]
       }
1 Like