I am using PZEM-DC sensor to measure the power generated by my solar panels. The sensor reports the voltage, current and power to Home Assistant. Unfortunately, the sensor does not generate any data about energy.
When I tried to setup the solar meter in the Energy dashboard, I cannot select any entity. It seems that an entity which measures energy (not power) is required. Therefore, I am wondering how to create an entity which measures energy (in kWh) using the power data from the PZEM-DC sensor? Do I need to do some math such as integration?
Thank you!
I added the following code to configuration.yaml:
sensor:
- platform: integration
source: sensor.pzem_003_power
name: pzem_003_energy
unit_prefix: k
unit_time: h
round: 3
method: left
Now I can see a sensor called sensor.pzem_003_energy, but its current value is Unknown. Is this normal and should I wait for one hour for it to refresh (since I set unit_time: h), or I should try some different configuration?
Update: After a few minutes, the energy sensor is updating. Now I can see solar data in Energy dashboard. Thx!