Rtl_433 sensordata with mqtt

Hello,
with rtl_433 i get this data:
pi2 = {“time” : “2024-07-02 11:15:01”, “model” : “Oregon-THN132N”, “id” : 83, “channel” : 1, “battery_ok” : 1, “temperature_C” : 22.400}
how can i get this mqtt/json data in homeassistant?
mqtt
sensor
- name: Temperatuur-433
state_topic: rtl_433/pi2
unique_id: temperature_C
value_template: “{{ value_json.temperature_C | float }}”
unit_of_measurement: " °C"
device_class: temperature

My data example is not working
Dick

Maybe check this:

Francis,
thanks
I read and tried your advice several tims, but there is somethings that i do WRONG.
no , it is not working.
Dick

here is an example of an mqtt.yaml entry I have for data pulled from rtl_433 (in this case the temp of a freezer with an rtl_433 sensor inside). I personally find entering them manually in my mqtt is easier, the mqtt auto discovery will pull in a bunch of unwanted entities.

-name: "Garage Freezer Temperature"
  state_topic: "rtl_433/433/devices/Acurite-Tower/A/7172/temperature_C"
  unique_id: "garage_freezer_temperature"
  device_class: "temperature"
  unit_of_measurement: "°C"
  value_template: "{{ value | float }}"
  qos: 0

thanks,
tht suggestion is ok but how do you get this data tio a dashboard.
Is there not a connection with configuration.yaml needed?
Dick

in the configuration.yaml file have the following

mqtt: !include mqtt.yaml

then put the lines I outlined above (adjusted for your scenario) in the mqtt.yaml file.

then after your reboot you will have an entity by the name assigned in the mqtt.yaml file.

thanks,i will try
Dick