Hi there,
I’m having some issues integrating my new solar system to the energy dashboard.
It seems like the solar energy produced is also being counted as consumed energy, or something along those lines.
I’m using two Shelly 3PMs:
• One is connected to the cable coming from the solar inverter to the distribution board.
• The other one is connected from the distribution board to the house.
Since, as I understand it, I can’t use just the energy meter for solar power directly, I’m using the following helpers:
- platform: integration
source: sensor.einspeiseleistung
name: Einspeiseenergie
unit_prefix: k
unit_time: h
round: 2
method: trapezoidal
- sensor:
- name: "Einspeiseleistung"
unique_id: einspeiseleistung_watt
unit_of_measurement: "W"
device_class: power
state: >-
{% set pv_power = states('sensor.pwr_hak_pv_total_active_power')|float | abs %}
{% set grid_power = states('sensor.pwr_hak_ott_total_active_power')|float %}
{% set net_power = pv_power - grid_power %}
{{ 0 if net_power < 0 else net_power }}
It would be great if someone could point out what I’m doing wrong.
Next week, I’ll be replacing the entire electrical cabinet (the one with the energy meters and breakers) with a newer model.
If a different setup would make the integration easier, I could easily make those changes during the upgrade.