zaubererty / homeassistant-mvpv

MYPV integration for home assistant
MIT License
18 stars 7 forks source link

Enable long term statistics for Power to show it in Dashboard "Energy" #4

Open stumbaumr opened 2 years ago

stumbaumr commented 2 years ago

Describe the bug I would like to add the MyPV AC ELWA-E to my distinct devices in /config/energy to make it show up in /energy

To Reproduce Steps to reproduce the behavior:

  1. Trying to add a distintc device
  2. My AC ELWA-E Power sensor does not show up

Expected behavior

Power shoud be configured as long term statistics entity: https://developers.home-assistant.io/docs/core/entity/sensor/#long-term-statistics

Versions (please complete the following information):

coccyx00 commented 1 year ago

The energy dashboard needs an energy sensor. The ELWA does not provide this information.
But you can use this integration to calculate the energy from the power value (Aktueller Verbrauch): Please note that the sample time of the mypv integration is 10 seconds whereas the ELWA will change the actual power more often. So the calculated energy is only an estimation.
If you need more accurate data you may query the current power with modbus (register 1000) and use the integration above.