How to enable power consumption statistics

WORKS!


THANKS!!!

Strange, after restart of the system statistics dissapear, shall it be like this?

No, my energy dashboard works fine after a restart.

Oh maybe HA switchedoff yesterday, and I just start it again, that is why all statistics for today is 0? Is there a chance to see passed days, weeks, month, YTD etc?

Hello, i have some trouble setting up the new Energy Dashboard.
I can not select the entity.

Here the Configuration:

What did i do wrong?

Thank You!

1 Like

My problem has been solved :slight_smile:

1 Like

Hi, I have a similar poroblem, my template skill are low

How to fix this? The correct energy value is here sensor.prism_energia_totale which comes from


  - platform: mqtt
    name: "Prism energia totale"
    state_topic: "prism/1/wh_total"
    unit_of_measurement: 'kwh'
    state_class: "measurement"
    device_class: "energy"

  - platform: template
    name: "house_energy_kwh"
    unit_of_measurement: "kWh"
    state_class: measurement
    device_class: energy
    state: {{states('sensor.prism_energia_totale}}  # THIS HOW TO MAKE IT WORK?
    attributes:         
      last_reset: '1970-01-01T00:00:00+00:00'

Klagio,

no need for a template sensor, this should work immediately


  - platform: mqtt
    name: "Prism energia totale"
    state_topic: "prism/1/wh_total"
    unit_of_measurement: 'kwh'
    state_class: "measurement"
    device_class: "energy"
    last_reset_topic: "prism/1/wh_total"
    last_reset_value_template: '1970-01-01T00:00:00+00:00'


1 Like

Thanks will try now.

I do have various devices that measures power not energy, I was thinking of using the integration platform. In that case I am forced to use template (hjow?)? Or can I add something


  - platform: integration
    source: sensor.efergy_802171
    name: total_energy_efergy
    unit_prefix: k
    unit: kwh
    round: 2
    method: left

Cattura

EDIT: OK this I was able to add device_class in customization, and now it works

1 Like

No its now showing up in the dropdowbn menu when I add device

Cattura

Cattura

It has state_class, last_reset, unit_of_measurement, device_class, all OK? There is no reason it does not show up.

is your a question or statement? Yes to me it seems it has it all …

state_class: measurement
last_reset: β€˜1970-01-01T00:00:00+00:00’
unit_of_measurement: kwh
friendly_name: Prism energia totale
device_class: energy

tried to customise with kWh (W capital letter), but no it still does not appear

Yes, no reason it should not be available in the energy tab.

Ok I changed the value of the last_reset to
2021-08-09T11:47:23.862268+00:00

and now it works

Hello, I am also struggling with this… would you be so kind and share code that you have in customization file.
Thank you in advance

I solved by changing the value of last_reset

Hi, how do I reset stats on a zigbee plug? The sensor does not have a last_reset parameter. Thanks.

Would it be possible to make an anergy measuring template from the time a bulb is on, knowing that the bulb is consumming 5Wh ?

Look at powercalc, it does exactly that and more.

Thanks for this info