when is the JSON transformation applied? Before the data reaches the item or after?
The thing is the json is a string and my item is configured as Number.
The end result with $.power would be a number but I only get NULL with this config.
That’s the correct transform, and your configuration looks correct to me. The next thing I would test would be to double check and make sure that the channel is actually returning the json string that you are expecting. If the JSONpath transform fails to find a match for your path definition then it returns the whole json string, not NULL. The fact that you are still getting NULL is an indication that possibly the channel is sending NULL in the first place.
I changed the Item type to String then I get the full JSON object as the value, as you are describing the whole json string is returned in case the transforrm failes to find a match?
Thats thechanged item where I get the full json as the value:
The N/A in the State Format field is unusual. I don’t use text definitions, but if you use the UI to create the profile, then State Format remains blank:
Do you see any errors in the logs when this item changes?
Can you go to the API Explorer and under Links → Get put the item name washerpower in the itemName string field? It should return a JSON like this that has no stateFormat key: