I read quite a lot about item-maps and sitemap-selection-maps with a visibility declaration.
how can i make a sitemap-selection that displays a image upon the selected inline mappings=[1001=“my”, 1002=“my2”] dynamicaly?
The sitemap-visibility option does not show the image and setpoint item until i reload the page right now.
The use case is a audio DSP that has presets and should not show Faders upon certain chosen presets:
.item:
String Audio_Preset "Audio preset" <settings> { exec='>[*:python C:/openhab/conf/scripts/audio.py 10.9.1.4 "RECALL PRESET %2$s"]'}
Number Audio_Volume1 "Volume1 (dB) [%.1f]" <soundvolume> { exec='>[*:python C:/openhab/conf/scripts/audio.py 10.9.1.4 "SET FDRLVL 134 1 %2$s" "SET FDRLVL 134 2 %2$s"]'}
Number Audio_Volume2 "Volume2 (dB) [%.1f]" <soundvolume> { exec='>[*:python C:/openhab/conf/scripts/audio.py 10.9.1.4 "SET FDRLVL 134 3 %2$s" "SET FDRLVL 134 4 %2$s"]'}
.sitemap:
Frame {
Text label="Audio" icon="soundvolume" {
Selection item=Audio_Preset mappings=[1001="my", 1002="my2"]
Setpoint item=Audio_Volume1 step=2.5 minValue=-100.0 maxValue=12.0 visibility=[Audio_Preset==1001]
Setpoint item=Audio_Volume2 step=2.5 minValue=-100.0 maxValue=12.0 visibility=[Audio_Preset==1002]
Image url="http://x.x.x.x:8080/static/audio_presets/RoomPreset1.png" visibility=[Audio_Preset==1001]
Image url="http://x.x.x.x:8080/static/audio_presets/RoomPreset2.png" visibility=[Audio_Preset==1002]
}
}
Thanks for help!