Closed robhuls closed 3 years ago
It has already the needed attributes see https://github.com/fsaris/home-assistant-zonneplan-one/blob/9d0c2045fa7a8c29aa1b684d27efdf7b426999df/custom_components/zonneplan_one/const.py#L83
You are using version 0.0.4?
For me it shows up in the energy entity selector
Electricity consumption has the correct properties and is visible. However, electricity production is not visible (at least, if I understand correctly).
I had the same challenge and solved it by using an integration sensor:
- platform: integration
source: sensor.zonneplan_p1_electricity_production
name: electricity_production
unit: kWh
unit_prefix: k
round: 2
This seems to do the trick as you can then select the electricity_production sensor.
The yield total
value holds the production of your solar panels.
_p1_electricity_production
is a W
value and not a kWh
that is why it doesn't show up in the selector.
The energy dashboard only works with kWh
values. And I don't think it's possible to calculate the W
values to kWh
as the first is a current value and the second a cumulative.
The P1 provides the kWh
values in the official protocol but seems like Zonneplan doesn't expose these in there API response. Will reach out to them to see if they are available.
I had the same challenge and solved it by using an integration sensor:
- platform: integration source: sensor.zonneplan_p1_electricity_production name: electricity_production unit: kWh unit_prefix: k round: 2
This seems to do the trick as you can then select the electricity_production sensor.
@pim-simons This is indeed a valid work around. Didn't see at first that you used the integration
component to calculate the kWh
.
Tnx for this hint. Will add it to the readme so others can also use this until we got the real values from the API
This works for me too, thanks!
Since #7 the energy consumption provided by the P1 sensor can be used in the energy dashboard. However, energy production cannot be selected yet. I think we need the production equivalent of this entry in const.py:
The instantaneous energy production is retrieved in the integration, but as far as I can see, the total production today is not yet. It is unclear for me how the mapping from the REST interface works.