My MQTT farm sensor entity flips between working and entity unavailable

It looks like its reading one number as a number then the next as a string i.e. Not A Number. I would have thought my value template should have made it turn the string into a number. Just checking you reloaded mqtt yaml after adjusting the yaml.

sensor:
template:
  - trigger:
      - platform: state
        entity_id: ruuvi_temp
        not_to:
          - unavailable
          - NaN
    sensor:
      - name: farm fridge Temperature
        state: '{{ trigger.to_state.state }}'
        device_class: temperature
        unit_of_measurement: '°F'

An alternative I saw here was to create a new sensor based on a template of the old sensor seen here 123’s solution. Now you end up with 2 sensors.