I’m having the same problem. I tried to have a channel that reads a MQTT topic with a json payload, which partially extracts the info, and then multiple items that extract just what they need from the result
The topic contains the following json:
{"Info1":{"Module":"Sonoff ZbBridge","Version":"12.1.1(zbbridge)","FallbackTopic":"cmnd/DVES_28A286_fb/","GroupTopic":"cmnd/tasmotas/"}}
I have a “Info1” channel with a transformation of $.Info1 I was expecting this to give me:
{"Module":"Sonoff ZbBridge","Version":"12.1.1(zbbridge)","FallbackTopic":"cmnd/DVES_28A286_fb/","GroupTopic":"cmnd/tasmotas/"}
and then I could have multiple items that just extract a single part eg $.Module $.Version etc.
But what I get is:
{Module=Sonoff ZbBridge, Version=12.1.1(zbbridge), FallbackTopic
=cmnd/DVES_28A286_fb/, GroupTopic=cmnd/tasmotas/}
I can work around it by having no transformation on the channel, and then on the items extracting with the full path. eg: $.Info1.Module $.Info1.Version
The thing/channel config is:
UID: mqtt:topic:local:zbbridge
label: Zigbee Bridge
thingTypeUID: mqtt:topic
configuration:
payloadNotAvailable: Offline
availabilityTopic: tele/tasmota_28A286/LWT
payloadAvailable: Online
bridgeUID: mqtt:broker:local
channels:
- id: info1
channelTypeUID: mqtt:string
label: Info1
description: ""
configuration:
stateTopic: tele/tasmota_28A286/INFO1
transformationPattern: $.Info1
My events.log shows:
2022-09-13 12:36:15.978 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'ZigbeeBridge_module' changed from NULL to {Module=Sonoff ZbBridge, Version=12.1.1(zbbridge), FallbackTopic=cmnd/DVES_28A286_fb/, GroupTopic=cmnd/tasmotas/}