I made a sensor for the output of the shared wind-turbine or windmill from the Windcentrale, also called Winddeler. The wind-turbine is in my case called De Jonge Held, or short ‘djh’ in my code. For this wind turbine there are 10154 shares of which I own 3, hence the 3 * 10154 in the code to calculate the power. When you own shares in one of the other windmills you need to change the URL in the resource. I found mine here: https://github.com/damonnk/windcentrale/blob/0ff9239b2fe5d8ffc05ccbaa9b8bac09cba7796f/molens.xml however I had to change the 21 to 2 for de jonge held.
My relevant part out of sensors.yaml
- platform: rest
name: djh
json_attributes:
- windSpeed
- windDirection
- powerAbsTot
- powerAbsWd
- powerRel
- diameter
- rpm
- pulsating
- hoursRunThisYear
- runPercentage
resource: https://zep-api.windcentrale.nl/production/2/live
value_template: '{{ value_json.powerAbsTot }}'
unit_of_measurement: "kW"
- platform: template
sensors:
djh_speed:
friendly_name: 'Wind Snelheid'
value_template: '{{ states.sensor.djh.attributes["windSpeed"] }}'
unit_of_measurement: "bft"
djh_mypower:
friendly_name: 'Wind Power'
value_template: '{{ (states.sensor.djh.attributes["powerAbsTot"] * 1000 * 3 / 10154) | round(1) }}'
unit_of_measurement: "W"
djh_wind_direction:
friendly_name: 'Wind Richting'
value_template: '{{ states.sensor.djh.attributes["windDirection"] }}'