MQTT Sensor adding

Hope someone can help me, i am trying to move an old sensor i have on a node-red dashboard to an entity/device on home assistant. I have a pi that publishes just a temperature figure to a topic.
All i want to do is to subscribe to that topic and have it display as something i can then use in homeassistant on a dashboard or automation hopefully.
Having spent allot of time trying the rather confusing (to me anyway) tutorials i failed.
From what i can tell something like this should work -

mqtt:

  • sensor:
    name: “OutsideTempF1”
    state_topic: “homeassistant/ext/temp1front”
    device_class: “temperature”
    qos: 0
    value_template: “{{ value_json.temperature_f }}”

It does show up as an entity but everything i try to then add this to a dashboard just shows “unknown” frustrating. All i want is to add a couple mqtt topics as sensors as these are one wire outside temperature linked to a pi.
Any advice would be so gratefully appreciated been trying for 3 days without success im probably missing something really simple but i just cant get it.

You haven’t formatted your yaml so people will be less likely to have a look at your code. It probably should look more like this.

mqtt:			
  sensor:			
    - name: "OutsideTempF1"
      state_topic: "homeassistant/ext/temp1front"
      unit_of_measurement: '°F' 
      device_class: "temperature"
	  value_template: “{{ value_json.temperature_f }}”

example of the JSON

{"model":"Nexus-TH","id":114,"channel":1,"battery_ok":1,"temperature_C":9.400001,"humidity":73,"protocol":"Nexus, FreeTec NC-7345, NX-3980, Solight TE82S, TFA 30.3209 temperature/humidity sensor","rssi":-53,"duration":877000}

Are you sure of the JSON payload of your state topic is correct. If this doesn’t work show the whole Json - everything between { everything }