I have a switch for my lock and Habpanel does not show correct state.
Switch Door_Lock "Dörrlås [MAP(lock_se.map):%s]" <lock> (security) { exec=">[ON:/home/openhab/vsurelock.sh] >[OFF:/home/openhab/vsureunlock.sh]" }
This is the switch in Classic UI:
and at the same time in Habpanel:

/Mike