How to update a contact in sitemap when it changes status

I have a GPIO contact that I am showing in a sitemap.
It works well (except the default icon-window, but i’ll change that later)
EXCEPT it does not update when changed. I have to refresh the page to see the changes.

I have in items:
Contact NormallyOpenPushButton “Normally Open Push Button” { gpio=“pin:26 debounce:10” }

and in sitemap:
Text item=NormallyOpenPushButton

I searched, but all I could find is ways to display information received on MQTT, not red with GPIO

should I do something like:
if NormallyOpenPushButton==Closed {
postUpdate (NormallyOpenPushButton, Closed)
}

solved: restart openhab