Json number reported ad not number

Hi folks, I’ve a mqtt topic that report a message like the following {"id":"F8:C3:9E:0C:05:86","rssi":-57} and I’ve trying to extract the rssi sensor with the following code

- platform: mqtt
  name: "OMG_F8C39E0C0586" #HUAWEI Band 2-586
  state_topic: home/OpenMQTTGateway_LOLIN32LITE_BLE/BTtoMQTT/F8C39E0C0586
  icon: mdi:bluetooth
  expire_after: 60
  value_template: "{{ value_json.rssi | int }}"
  json_attributes_topic: home/OpenMQTTGateway_LOLIN32LITE_BLE/BTtoMQTT/F8C39E0C0586
  json_attributes_template: "{{ value_json }}"

But instead a linear graph with a number I’m obtaining something like text (I guess) because my graph is like the following

image

Where I’m wrong?

- platform: mqtt
  name: "OMG_F8C39E0C0586" #HUAWEI Band 2-586
  state_topic: home/OpenMQTTGateway_LOLIN32LITE_BLE/BTtoMQTT/F8C39E0C0586
  icon: mdi:bluetooth
  expire_after: 60
  value_template: "{{ value_json.rssi }}"
  unit_of_measurement: 'dBm'
  json_attributes_topic: home/OpenMQTTGateway_LOLIN32LITE_BLE/BTtoMQTT/F8C39E0C0586
  json_attributes_template: "{{ value_json }}"
1 Like

Yes, it is! Many thanks!