Sharing working config for the SolarEdge API using the Energy Dashboard. There were a lot of open topics arond this in the last 18 months, thought it would be useful for others.
Firstly:
Add sensors manually:
- platform: template
sensors:
solaredge_battery_depletion_rate:
friendly_name: "SolarEdge Battery Depletion Rate"
unit_of_measurement: kW
device_class: energy
value_template: >
{% if (state_attr("sensor.solaredge_storage_power", "status")) == "Discharging" %}
{{(states('sensor.solaredge_storage_power') | float)}}
{%- else -%}
0
{%- endif %}
icon_template: mdi:lightning-bolt
solaredge_battery_charge_rate:
friendly_name: "SolarEdge Battery Charge Rate"
unit_of_measurement: kW
device_class: energy
value_template: >
{% if (state_attr("sensor.solaredge_storage_power", "status")) == "Charging" %}
{{(states('sensor.solaredge_storage_power') | float) * -1}}
{%- else -%}
0
{%- endif %}
icon_template: mdi:lightning-bolt
solaredge_pv_generation:
friendly_name: "SolarEdge PV Generation"
unit_of_measurement: kW
device_class: energy
value_template: >
{{(states('sensor.solaredge_solar_power') | float)}}
icon_template: mdi:lightning-bolt
After which, create Riemann sum integral (Install, then add via Helpers) as “left”, associated with each
You can then link those newly generated helpers to the dashboard config items. it will update once an hour. the dashboard will complain that the data types are not correct, but it does work.
I didn’t create for energy from the grid as this now comes from an Octopus Mini, and previously I was using a CT clamp.
confirmed working after a few days of testing: