muppet3000 / homeassistant-growatt_server_api

Home Assistant Integration for Growatt - Upstream repo for the growatt_server integration that is part of the Core Home Assistant repository
MIT License
52 stars 6 forks source link

BUG - Expected data source not listed in power dashboard #25

Closed MaciekzP closed 1 year ago

MaciekzP commented 1 year ago

Describe the bug

When adding PV production in energy dashboard only "Lifetime energy output" entity is displayed. To Reproduce

  1. Go to settings ==> dashboards
  2. Click energy dahsboard
  3. In PV section (top right) click "add PV production. Scroll down list of entieties will be displayed.
  4. The only visible entieties visible from growatt integrations are "Lifetime energy output" but would expect "Output power" Growatt Device Type

    Device(s): Inverter

Home Assistant information

Additional context

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

muppet3000 commented 1 year ago

Please can you use the template that is pre-populated for bug fixes. It provides all of the relevant information required to investigate and fix problems. Without that template being populated I will be unable to progress this bug.

muppet3000 commented 1 year ago

I've looked through the code, this is correct behaviour.

I think you're misunderstanding how the Energy Dashboard works in Home Assistant.

It doesn't work by taking the kW or W output of a device and then calculating the kWh from that. Instead it takes a running total of the kWh and then aggregates it/separates it over time.

If you select that value I can promise you it'll give you the expected result.