jobvk / Home-Assistant-Windcentrale

Provides Home Assistant sensors for multiple wind turbines from the Windcentrale
https://jobvankoeveringe.com/projects/windcentrale/
Apache License 2.0
14 stars 3 forks source link

Discrepancy in energy shares value #59

Closed gerard76 closed 2 years ago

gerard76 commented 2 years ago

Checklist

The problem

I have shares in a wind turbine that I own since august this year and it shows 1503kWh as energy_shares in the integration, but in reality it is 360kWh.

month_shares show the correct number

Screenshot 2022-11-06 at 09 31 56 Screenshot 2022-11-06 at 09 31 41

What is version of Home Assistant Core did you recieve the bug?

2022.11.1

What is version of Home Assistant Supervisor did you recieve the bug?

2022.10.2

What is version of Home Assistant Supervisor?

2022.10.2

What is version of the Windcentrale integration?

0.2.5

Example Code snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

jobvk commented 2 years ago

Yes that's because that sensor uses the live data API. In doing so, it looks at what the year energy total is with the year_production value. That was when you took the screenshot 2085556 kWh.

Assuming you have 4 shares of the Vier Winden the formula would look like this: (2085556 / 5512) * 4 = 1513.4658926

And since you only bought your shares in August, the value is indeed not correct. Unfortunately, I cannot show the data from month_shares as that APi updates only once the day after.

gerard76 commented 2 years ago

wontfix then.

Maybe slight change in the README description of sensor.name_production_year_shares and sensor.name_energy_shares which are now basically equal with:

The energy that your shares of the wind turbine has produced this year.

and

The energy produced by your shares of the wind turbine this year.

But I cannot think of a succinct way to convey the actual meaning