Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Usage with new Energy Dashboard #30

Closed
henrikbjorn opened this issue Aug 4, 2021 · 1 comment
Closed

Feature: Usage with new Energy Dashboard #30

henrikbjorn opened this issue Aug 4, 2021 · 1 comment

Comments

@henrikbjorn
Copy link

The new Energy Dashboard can't find the total value. I think this is because the sensor is missing a last_reset property.

https://www.home-assistant.io/more-info/statistics/

https://developers.home-assistant.io/docs/core/entity/sensor/#long-term-statistics

Not sure how it works, but it seems that last_reset could just be the meeting date.

@JonasPed1
Copy link
Collaborator

JonasPed1 commented Aug 8, 2021

For now it is not a feature that I will add as only sensors with present data should support long statistics (see https://developers.home-assistant.io/docs/core/entity/sensor/#long-term-statistics). Eloverblik sensors will always be at least one or two days old. This is not something that can be changed as this is what eloverblik.dk delivers.

If you insist on using the data you can add a template sensor like below. Just note that data will be shown on the wrong date in statistics card etc.

template: 
  - sensor: 
    - name: "Eloverblik Long Term Statistics"
      unit_of_measurement: kWh
      state: "{{ states('sensor.eloverblik_energy_total') }}"
      attributes: 
        device_class: energy
        state_class: measurement
        last_reset: "{{ state_attr('sensor.eloverblik_energy_total', 'metering_date') }}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants