Item Number:Temperature and MQTT

  • Platform information:
    • Hardware: x86
    • OS: openhabian on Ubuntu
    • Java Runtime Environment: Zulu 8
    • openHAB version: 3 stable
  • Issue of the topic: If item set as Number, it publish right value. If Number:temperature, it publish old value
  • Please post configurations (if applicable):
    • Items configuration related to the issue

    • Services configuration related to the issue

UID: mqtt:topic:localmosquitto:zigbee_TRVstudio
label: Zigbee TRV Studio
thingTypeUID: mqtt:topic
configuration: {}
bridgeUID: mqtt:broker:localmosquitto
  - id: setpoint_TRV
    channelTypeUID: mqtt:number
    label: SetPoint TRV Studio
    description: null
      retained: false
      postCommand: false
      min: 5
      formatBeforePublish: '{ "device":"TRV_Studio", "Write":{"TuyaTempTarget":%s} }'
      max: 35
      commandTopic: cmnd/zigbee_router/ZbSend
      step: 0.5
      stateTopic: tele/zigbee_router/TRV_Studio/SENSOR
      transformationPattern: REGEX:(.*\"TuyaTempTarget\".*)∩JSONPATH:$.ZbReceived.TRV_Studio.TuyaTempTarget
  • If logs where generated please post these here using code fences:
    Output to MQTT channel:
    { "device":"TRV_Studio", "Write":{"TuyaTempTarget":17} } and never be updated.

If setup as Type=Number everything works fine, but I cannot have °C into the data.

You don’t seem to have set any unit on your MQTT number channel

Thank you!!
I forgot to re-set while configuring channel!