Simple transform - number item (1 or 0) to "Running" or "Stopped"

This worked all day long for me in previous version of OpenHAB, but doesn’t seem to anymore.

Number itm_washer "Washer Status [MAP(]" (ALL) {mqtt="<[mymosquitto:/+/+/c8dbdb869c92/vib:state:MAP(]"}

I’ve also tried state:default instead of state:MAP


Text item=itm_washer

Transform file

I see the label Washer Status, but no text or number on the right side of it. It’s just blank.

/var/log/openhab2/openhab.log gives this error:
[rm.AbstractFileTransformationService] - Could not transform ‘-’ with the file ‘’ : Target value not found in map for ‘-’

The error might be startup error.

I’m publishing this to MQTT:

mosquitto_pub -h localhost -t '/ble/livingroom/c8dbdb869c92/vib' -m '1'

add another entry in your file:


This will not solve your problem of course…

Something is not working with your subscription. The item state is currently -

Try not to use the single level wildcard (+) and don’t use the leading separator to see if things improve:

Number itm_washer "Washer Status [MAP(]" (ALL) {mqtt="<[mymosquitto:ble/livingroom/c8dbdb869c92/vib:state:MAP(]"}

and of course, check your logs for connection problems between OH and the broker

Add a space after the { and before the }

Number itm_washer "Washer Status [MAP(]" (ALL) { mqtt="<[mymosquitto:/+/+/c8dbdb869c92/vib:state:MAP(]" }

You have a Number Item.

Presumably your MQTT message is a Number.

But you apply to the MQTT message which returns a String (Running, Idle, unknown) which cannot be assigned to a Number Item.

You then apply the same to the label.

So you either need to

  • Change the Item to a String Item and remove the MAP in the label
  • Remove the MAP in the MQTT config and change it to default.

Well, that was strange. I tried state:default before and it didn’t work. Tried it again just now and everything works correctly.