HA not displaying my Temp

First time home automation person here, I’ve purchased a few Sonoff relays and ds18b20 temp sensors. I’ve flashed the Sonoff’s with EasyESP RC147, R120 stable just would not work. Any way got the switches working and then added the temp sensors, Sonoffs are reading the temp sensors and broadcasting to the Pi3 over MQTT but I’m not gettting a rreading on my HA main page, it’s just got 2 dashes and says no state history. Any ideas?
sensor:

  • platform: mqtt
    state_topic: “Sonoff1/Temp/Temperature”
    name: “Sonoff1”
    qos: 1
    unit_of_measurement: “C”

  • platform: mqtt
    state_topic: “Sonoff3/Temp/Temperature”
    name: “Sonoff3”
    qos: 0
    unit_of_measurement: “C”

Temp starting working without doing anything but the gpio relay switch wouldnt work then, restart hass and temp not working but switch is working.

Sorted now. Just read up on json. Had to change the raw mqtt data.

Spoke too soon. It seems the temp that appeared is retained from the once that it worked yesterday. Still not reading the mqtt messages and displaying them.