Change Unit of Measurement affects InfluxdB and Grafana

I changed the Unit of Measurement of sensor.solaredge_lifetime_energy in the frontend from Wh to MWh, which looked better in the lovelace GUI. The energy dashboard doesn’t mind.
After a few days I discovered it does affect InfluxDB and as a result Grafana. InfluxDB started a new times series “hassio”.“autogen”.“MWh” it was “hassio”.“autogen”.“Wh”. The Grafana graphs didn’t update. Changing the Unit of Measurement back to Wh solved this.

Maybe a warning in the GUI if infuxDB is installed?

As an alternative you may take control in the influx integration configuration and use “override_measurement” to define the measurements created in influx.

I used only global settings with wildcards based on the entity name like

  component_config_glob:
    sensor.*temperature*:
      override_measurement: temperature

to put all temperatures into the “temperature”-measurement instead of the default by unit “°C”

should also work for single entities, but I have not verified the syntax:

  component_config:
    sensor.solaredge_lifetime_energy:
      override_measurement: Wh

Or use it to group into measurements in influx in a different way, like everything related to energy into the same measurement.

This is inside the “influxdb”-configuration, see documentation for details, but unfortunately it does not have samples for “override_measurement”

Armin