Energy integration and utility meters

Hello everyone

I’ve been playing around with the new built-in Energy integration. I have set everything up, found the documentation for utility meters to select different tariffs.

The problem now with utility meters is that a cycle reset is required so the counter goes back to 0 every hour, month, day, year, etc… The problem is that when I do a reset, let’s say daily, the energy integration substracts the accumulated value and the next reading I get a negative value.

I’ve been checking this documentation but can’t get it to work.

This is my utility meter setup, the sensor is a Efergy

utility_meter:
  consumo_diario:
    source: sensor.energy_consumed
    name: Consumo Diario
    cycle: quarter-hourly
    tariffs:
      - punta
      - valle
      - llano

And this the customization for the Energy integration

homeassistant:
  customize_glob:
    sensor.consumo_diario_punta:
      last_reset: '1970-01-01T00:00:00+00:00'
      device_class: energy
      unit_of_measurement: kWh
      state_class: measurement
    sensor.consumo_diario_valle:
      last_reset: '1970-01-01T00:00:00+00:00'
      device_class: energy
      unit_of_measurement: kWh
      state_class: measurement
    sensor.consumo_diario_llano:
      last_reset: '1970-01-01T00:00:00+00:00'
      device_class: energy
      unit_of_measurement: kWh
      state_class: measurement

Here’s how the graphs are showing so you know what I mean with negative values:

Anyone had this problem?
Thank you beforehand

So I don’t know if this is with the new update or not. I went to energy configurator and a message showed up saying that device class was set as measurement (as seen in the open post) and not as total_increasing.

I’ve changed it and I will update if that fixed the problem

You need to be using Home Assistant 2021.9 and you need the state class total_increasing, not measurement.

You should not have to specify the state class for the utility meter. It will do this for you.

Last reset is no longer a valid attribute.

Remove your customizations and restart.

Thanks I am trying it. In 15 minutes I will see if it works.

If I remember correctly I needed to use customization in order to utility meters show up in energy grip consumption select, maybe I’m wrong and I mixed things since I started without utility meters.

In any case, thank you very much as always.

Did you work this out? I’m trying to get my utility meters to show up as Individual Devices as well.

What do you mean by this?

As per this post. I’ve taken some smart plugs that report in W and converted to kWh - then to a template to get into the energy dashboard as individual devices.

It seems to be working now with this setup, but seems overly complicated. Not sure if there’s a simpler way.

index

1 Like

After a quick exchange with Mike - the dev behind the awesome Actron Que HA Plugin for a ducted Air Conditioner available in Australia, he’s found the entity for the compressor power of the system and added it to his addon.

I’ve now added these sensors to my configuration.yaml so can now see the power usage of my aircon in my “Individual Devices” section of the HA Energy Dashboard.

UPDATE: Was making my life way too complicated. Integration Sensors now work without additional sensors right in the Energy Dashboard - just a minor customize section in customize.yaml.

sensor:
#Integration Sensors
  - platform: integration
    source: sensor.air_conditioner_compressor_power
    name: Air Conditioner Compressor Energy Spent
    unit_prefix: k
    method: left

then this added to customize.yaml :

sensor.air_conditioner_compressor_energy_spent:
  last_reset: '1970-01-01T00:00:00+00:00'
  state_class: 'total_increasing'
  device_class: energy
  unit_of_measurement: kWh 

Seems to be working now!

1 Like

I tried to apply a similar setup but still can’t get my utilities sensors as an option for energy consumption within the energy dashboard.

sensor.electricity_pixometer:
  state_class: 'total_increasing'
  device_class: energy
  unit_of_measurement: kWh

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

have you found solution??? because my new utility meter sensor also does not show up…
same attributes as other sensors

The solution for me is on the OP tagged as solution by the user tom_l

might me beeing stupid, but could someone write out everyhting to get this working?