[SOLVED] Basic UI: switch status (mdl-js-switch) ist not shown correctly if visibility is changed


i’ve got a strange behaviour with BasicUI on Firefox:


Switch sTest1 "Switch 1 [%s]"
Switch sTest2 "Switch 2 [%s]"


sitemap test label="Test" {
    Frame {
        Switch item=sTest1
        Switch item=sTest2 visibility=[sTest1==ON]


  • Turn on switch 1

  • switch 2 is visible with status “OFF” but the checkbox label will be shown as “ON”

  • Everything works fine with IE

  • Everythings works fine on Firefox if i remove the visibility based on sTest1

  • The Problem only exists if the status of sTest2 is OFF. If i change the status of sTest2 to ON and switch OFF and ON sTest1 -> Status will be shown correctly. If i change sTest2 back to OFF and switch OFF and ON sTest1 -> status of sTest2 is OFF but the label is shown as ON


  • I can see that the status change of sTest1 to ON also adds the class “is-checked” of the checkbox label
  • This does not happen on IE


  • openhab is running as an docker container on rpi4 (last official image 2.4.0, openhab/openhab)
  • Basic UI: ui-basic - 2.4.0
  • Firefox: 68.0.1 64bit
  • Client OS: Windows 10 Pro 64bit

Do you have any ideas?

Thanks for any help in advance

screenshots of HTML because of new user limitation (only one screenshot in a post)



Should be tested in a recent 2.5 snapshot as things were changed with visibility. I am not sure but I think it could be a fix to your issue.


I tested it on openhab:2.5.0-snapshot-armhf-debian and everything seems to work as expected.

Thanks :slight_smile:

1 Like