Numeric value is not a numeric value

ValueError: Sensor sensor.pcroom_window_rssi has device class 'signal_strength', state class 'measurement' unit 'dBm' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: '{"pid":168,"battery":89,"illuminance":247,"window":1,"rotation":9.6,"rssi":-50,"src":"B8DXXXXXXX"}' ()

Really? Since when is -50 not considered a numeric value?

It comes from MQTT discovery, created by Shelly script.
The fragment from discovery definition:

"val_tpl": "{{ value_json.rssi }}"

And the content in the state topic:

{
  "pid": 169,
  "battery": 89,
  "illuminance": 319,
  "window": 0,
  "rotation": 0,
  "rssi": -50,
  "src": "B8DXXXXXXX"
}

Yes, the value

is not a number.

Are you sure that value template is defined? That error tells me that it’s not defined and discovery is viewing the entire topic as the value.

I somehow thought the error message was intended to display the topic value, not a value picked by a template.

Sorry, it seems I acted hastily.