Energy Integration: Which utility meter cycle should I choose?

Hello,

I’ve search for an answer to this question but I haven’t found anything to clarity my doubt.
On the new Energy integration I can add my devices from a drop-down menu’. That menu’ shows all the utility meters I’ve configured in HA, and I have 3 meters for each device: one with daily cycle, one with monthly cycle and the last one yearly.

house_kwh_daily
house_kwh_monthly
house_kwh_yearly

Now, which should I choose from the drop-down menu’? I’ve tested with the daily one and it seems to work (showing same data that I have on my Grafana graphs), but the name is something incorrect, it shows daily even selecting monthly stats from the Energy Dashboard and that’s is because I’ve selected the daily meter. I can’t change that name on the utility meter because I need to distinguish from other cycles, but that name doesn’t fit the energy dashboard.

  • Is the daily cycle the right/best choice?
  • Should I create a new utility meter with some special setting for the energy dashboard?

Many thanks
M

Answering myself.

  • Utility meters are not supposed to be used on the Energy Dashboard
  • Until HA pre-2021.9 the supposed-to-be-used method to use MQTT sensors was forcing the last_reset property using the customize_glob stuff
  • From 2021.9 the new total_increasing device_state has been added, using a non-negative integral as other systems (grafana) does, so the last_reset stuff is not needed anymore.
- name: "Dishwasher (kWh)"
  platform: mqtt
  state_topic: "shellies/shellyplug-s-9776B7/relay/0/energy"
  unit_of_measurement: 'kWh'
  value_template: "{{ (( value|float )/(60*1000)) | round(2) }}"
  state_class: total_increasing
  device_class: energy

That is sufficient to the entity be shown on the Energy dropdown menu.

1 Like