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

Total number of shares is incorrect when you have several participations for a windturbine #53

Closed gh471 closed 1 year ago

gh471 commented 1 year ago

Checklist

The problem

The total number of shares is incorrect when you have several participations for a windturbine. I had already a participation with 3 shares for windturbine TW (Trouwe Wachter) and bought an extra participation with 1 share (also TW). The problem is that integration still shows only information on 3 shares. (sensor.de_trouwe_wachter and sensor.de_trouwe_wachter_power_per_share)

image

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

2022.10.2

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

2022.10.0

What is version of Home Assistant Supervisor?

9.0

What is version of the Windcentrale integration?

0.2.4

Example Code snippet

No response

Anything in the logs that might be useful for us?

2022-10-10 22:44:47.398 INFO (MainThread) [custom_components.windcentrale.wind] Testing if user credentails are correct 2022-10-10 22:44:47.398 INFO (MainThread) [custom_components.windcentrale.wind] Updating live data of windturbine De Trouwe Wachter using Rest API 2022-10-10 22:44:47.399 INFO (MainThread) [custom_components.windcentrale.wind] Updating news data sensor 2022-10-10 22:44:57.430 INFO (MainThread) [custom_components.windcentrale.wind] Updating live data of windturbine De Trouwe Wachter using Rest API

Additional information

I did some research on the issue and hope it helps a little...

  1. The json message contains the correct informatie: image
  2. The code already contains a method to collect all the shares: class Credentials: async def collect_projects_windshares(self): but is not called (the info text does appear in logs)
jobvk commented 1 year ago

It only checks your shares when adding the integration.

Steps how to solve the problem:

  1. You should go to Settings -> Devices & Services -> Integrations
  2. Try to reload windcentrale integration.
  3. Check if it works, if it doesn't proceed to step 4.
  4. Go back to Settings -> Devices & Services -> Integrations
  5. Delete the windcentrale integration.
  6. Add the windcentrale integration.
  7. Check if it works, if it doesn't you could send me the JSON message to my email: developer@jobvankoeveringe.com and I'll look in to it. Please change any private data to null
jobvk commented 1 year ago

Issue is solved by step 4-5-6