Utilities energy sensor not available in energy dashboard

I have setup my utility_meter based on rest and template sensor (pixometer). My utilties sensors have the expected values in kWh, but still I don’t get my utilities sensors as an option for energy consumption within the energy dashboard. How could this be forced?
I’ve tried to overrule the device_class and state_class on sensor.energy, but still no luck.

utility_meter:
  energy:
    source: sensor.electricity_pixometer
    cycle: daily
    net_consumption: true

my sensor has a device_class energy defined and measured in kWh

sensor:
  - platform: rest
    name: Pixometer Electricity
    resource: https://pixometer.io/api/v1/readings/?meter_id=XXXXXXXX&o=-created
    headers:
        Authorization: !secret pixometer_bearer
    json_attributes:
      - results
    value_template: "{{ value_json.results[0].value }}"
  - platform: template
    sensors:
      electricity_pixometer:
        value_template: "{{ states.sensor.pixometer_electricity.attributes.results[0].value }}"
        device_class: energy
        unit_of_measurement: kWh

ok, found the cause of it. Apparently still the unit of the sensor.energy was not set correctly in the statistics. By looking into ‘Developer Tools’ > ‘Statistics’ a warning was shown and by just pressing the ‘Fix’ button, the unit was fixed and the sensor.energy is now available within the Energy dashboard :muscle: :sunglasses:

1 Like