I’m not sure if the following is a bug or the intended behaviour; I was struggling with this issue since I began to use Openhab, however, and I want to hereby share it:
Basic UI & the Android App won’t update the state of switches neither their associated icons.
If you define the switch as text, it will work (hence show the defined/mapped strings), if you define it as switch, it won’t (hence not “flipping” the switch nor changing the icon e.g. from lit to unlit) . Maybe that’s because the switch state is being handled as a string and this string is wrongly interpreted after transforming?
Works:
Text item=Notmodus
Doesn’t work:
Switch item=Notmodus
As soon as you remove the mapping, everything works fine with both Basic UI and the Android App.
There seem to be further problems, which also could be caused by this bug (?).
Removing the mapping in the item definition helps with using the item as a switch in the app just as stated above. But when using the item as a text item like this
Text item=Ruhemodus
there is no state output at all. If I’m not mistaken there should be “OFF” or “ON” as a text item in the app, but the only thing you see is the icon and the label.
Also the on- and off-versions of the icons don’t work anymore in this case. Only the standard fallback icon is shown.
So there seem to be a general issue with switches as text items at least in the iOS app.
This is kind of a hop on - hop off thing. It always works in the Android App and Edge, it only sometimes works with firefox. That’s strange, but at least it works sometimes
I narrowed the problem down to the following:
if I update any item file Basic UI won’t react as usual anymore. Variables won’t get updated, visibility won’t get toggled and so on. Changes are only visible after reloading the page. This was mentioned before: https://github.com/openhab/openhab.android/issues/35#issuecomment-125887725
It starts working again without any problems after restarting Openhab.
Edit: Changing sitemaps also seems to break the stream.