Hi guys,
I’m integrating my Harmony Elite into the OpenHAB software and struggle with the sitemap. What I’d like to do is when a certain activity is started, the corresponding controls will appear. So for example, when the TV-activity is started, I’d like to have the button to switch channels appear in my screen and disappear again when the TV is shut down again.
The issue is within the if statement, but I used the .state already in a rule. Does anyone know if it is possible to use if-statements in the sitemap?
Here’s my code:
Frame {
Default item=Sunset_Time
Group item=OtherItem label= "Begane grond" icon="groundfloor"{
Frame label="Woonkamer"{
Switch item=HarmonyHubWoonkamerCurrentActivity label="Afsluiten" mappings=[PowerOff='PowerOff']
Switch item=HarmonyHubWoonkamerCurrentActivity label="Activteit" mappings=[TV='TV', Netflix='Netflix', Muziek='Muziek', PS3='PS3', 'RTL-XL'='RTL-XL']
if(HarmonyHubWoonkamerCurrentActivity.state == "TV") {
Switch item=YamahaVersterkerButtonPress label="Volume" mappings=[VolumeDown='-', VolumeUp='+']
Switch item=CiscoDVRButtonPress label="Bediening" mappings=[DirectionDown='Down', DirectionLeft='<',DirectionRight='>',DirectionUp='Up']
Switch item=CiscoDVRButtonPress label="Afspelen" mappings=[Rewind='<<', Play='>', Pause='||', FastForward='>>']
}
}