Strange with 1 MQTT input

I got a input with dimmer type, I can’t get this to work no matter how I try, the oddly part is I got similar structure it works. only this one with dimmer type,

Dimmer 	Light_LivingRoom_Ceiling_LED 		"LivingRoom Ceiling LED" 									(GH_Living, Lights, gSonoff, gOnOff)		["Lighting"]	{ mqtt=">[mosquitto:cmnd/sonoff-LED/Dimmer:command:*:default],<[mosquitto:stat/sonoff-LED/RESULT:state:JSONPATH($.Dimmer)]" }

OPENHap: cmnd/sonoff-LED/Dimmer 32
device: stat/sonoff-LED/RESULT {“POWER”:“ON”}
device: stat/sonoff-LED/POWER ON
device: stat/sonoff-LED/RESULT {“Dimmer”:32}

10:47:39.632 [WARN ] [b.core.events.EventPublisherDelegate] - given new state is NULL, couldn’t post update for ‘Light_LivingRoom_Ceiling_LED’

I would guess the JSONPATH is returning a value that cannot be parsed into a Number. For example, if the JSONPATH returns "32" or with leading or trailing white space these are not parsable into a Number.

Also, if the device message is exactly stat/sonoff-LED/RESULT {"Dimmer":32} JSONPATH will not work because this is not valid JSON. The stat/sonoff-LED/RESULT part is not valid JSON. You may need to use a REGEX transform instead.

That would be my first guess. Change the Item type to a String and check what your JSONPATH is actually returning in events.log or on the sitemap or in a rule and look for stray characters that would make the result non-parsable into a number. If there are, you may need to move to a REGEX or JS Transform to pull out the data.

Thanks for the reply, I will do as your advise.

Do you have a solution?

yes, not a solution but found out what’s wrong,
as you can see from my #1 posting,

OPENHap: cmnd/sonoff-LED/Dimmer 32
device: stat/sonoff-LED/RESULT {“POWER”:“ON”}
device: stat/sonoff-LED/POWER ON
device: stat/sonoff-LED/RESULT {“Dimmer”:32}

input value split, it should in one row when it’s in jason format, stat/sonoff-LED/RESULT, problem solved when report to Github