[Solved] Contact type item

Edit: ah saw the answer in a different thread, it has to be a number! Marked solved, thanks.

Hello,
I have a MQTT topic that publishes “0” or “1” if the door/window is open or closed. 1 means closed, 0 means opened.

Contact mywindow "front window" (ALL) {mqtt="<[broker:/house/front/window:state:default]"}

But with this Contact item, when ever the MQTT topic publishes, I get this event log:

[.c.i.events.EventPublisherImpl] - given new state is NULL, couldn’t post update for ‘mywindow’

I get this regardless if the value is 1 or 0 that’s being published. I have a sneaking suspicion I need to use a transform? But I’m unsure how to go about it.

Maybe you could add a link to the solution post you found. :slight_smile:

If someone finds this Thread here on Google, he/she maybe is glad to get a pointer to the direct solution.

1 Like

Good point! Here’s the thread:

1 Like