How to display a "contact" item in a sitemap on OH3?

All,

I’m using OH3 on raspberryPI4 since a few days and it makes quite some fun to just create all the things/items in the new UI. I managed to get over some issues but now stuck with displaying the open/closed status of my garage.

I’ve created a “contact” item and in this item I immediately see the status of the garage. Just when I try to add this item in a sitemap with a “text” or “switch” widget, it doesn’t show anything … do you know if “contact” items are compatible to the classic sitemaps and how I can embed these?

Thank you very much in advance for your help.

BR,
Mike

Just to be clear, we are referring to sitemaps, not MainUI Page widgets.

Add the contact as a text, but you also have to tell it to include the state in the label.

label="Garage door state [%s]"

That’s be a part of a text based Item config. If defining Items in the UI, add the parts between the [ ] to the State Description Item metadata as the Pattern.

Items | openHAB provides more information about displaying an Item’s state.

Thank you so much for the quick help!