Sitemap selection mapings with visibility autoload

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:

String Audio_Preset "Audio preset" <settings> { exec='>[*:python C:/openhab/conf/scripts/ "RECALL PRESET %2$s"]'}
Number Audio_Volume1 "Volume1 (dB) [%.1f]" <soundvolume> { exec='>[*:python C:/openhab/conf/scripts/ "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/ "SET FDRLVL 134 3 %2$s" "SET FDRLVL 134 4 %2$s"]'}

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!

What version of OH are you running. That’s a bug that I believe has been fixed months ago. So either you are running an earlier version of OH (e.g. OH 2.4 release) or it’s a regression.

if you are using string I believe it should look like


For sitemaps,it is very important for refresh purposes that the sitemap element at the top matches the filename.

Im on OH2.0 somewhere. So indeed it might be a solved bug.
@rossko57 sitemap name is same as filename without extension .sitemap
@kriznik choosing string visibility=[Audio_Preset=="1001"] or number visibility=[Audio_Preset==1001] does not change the behavior. It does not show/hide my elements.
I’m scared that I will brake my config when I make OH updates on this manual windows installation.

It’s really easy to make backups and recover on a Windows install. Make a copy of c:\openhab2 (or what ever you named it) e.g. copy to c:\openhab2.backup. Try the upgrade. If it breaks, delete c:\openhab2 and rename c:\openhab2.backup to c:\openhab2.

If you are not on the latest version of OH all I can do is assume it’s a bug that has already been fixed. You either need to live with it or upgrade to a version where it’s fixed.