If have trouble getting the state to update to item from mqtt.
topic from mqtt is : '{“state”:“OFF”,“color”:null}
On the thing configuration of a Generic MQTT, i enter the following at the Incoming Value Transformations:
“JSONPATH:$.state”
But that result in the following error
2023-05-05 16:43:37.269 [WARN ] [t.generic.ChannelStateTransformation] - Transformation service “JSONPATH for pattern $.state” not found!
2023-05-05 16:43:37.269 [WARN ] [ab.binding.mqtt.generic.ChannelState] - Command ‘{“state”:“OFF”,“color”:null}’ from channel ‘mqtt:topic:2613cfa615:89551dcf62:state’ not supported by type ‘OnOffValue’: No enum constant org.openhab.core.library.types.OnOffType.{“state”:“OFF”,“color”:null}
I have the same with the brightnes of a light
2023-05-05 16:29:52.360 [WARN ] [t.generic.ChannelStateTransformation] - Transformation service “JSONPATH for pattern $[brightness”] not found!
2023-05-05 16:29:52.360 [WARN ] [ab.binding.mqtt.generic.ChannelState] - Command ‘{“brightness”:100,“color”:null}’ from channel ‘mqtt:topic:2613cfa615:89551dcf62:brightness’ not supported by type ‘PercentageValue’: Unknown String!
i tested the jsonpath with online validators and those ‘find’ the state or brightness.