How to change history_graph label from C to F


I’m using a DHT22 temp/hum sensor and sending data over mqtt from ESP8266. Data looks good and is displaying temp in degrees °F correctly to the Lovelace UI. But the label on the History graph shows °C.


My configuration.yaml:

- platform: mqtt
    state_topic: indoorTemp
    name: "Indoor Temperature"
    unit_of_measurement: '°F'
    value_template: "{{ value_json.temperature }}"

My customize.yaml:

      friendly_name: Indoor Temperature
      device_class: temperature
      unit_of_measurement: °F
      value_template: "{{ value_json.temperature }}"

My ui-lovelace.yaml:

 - type: history-graph
      - entity: sensor.indoor_temperature
    unit_of_measurement: °F
    name: Indoor Temperature

I’ve tried using quotes in unit _of_measurement, etc., but nothing seems to change the label from °C to °F.

Any help would be appreciated.


it’s most likely coming from your history lookup or it’s cached in the browser. Try CTRL+F5 on the history page and see if that makes a difference. If not, shutdown HA, delete the database, and restart HA.


Deleting the database…that did it.