How to change history_graph label from C to F


#1

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.

history_graph

My configuration.yaml:

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

My customize.yaml:

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

My ui-lovelace.yaml:

 - type: history-graph
    entities:
      - 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.


#2

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.


#3

Deleting the database…that did it.
Thanks!