I’ve finished the installation of my fronius solar inverter and integartion in HA .I’m trying to built some template sensors to manage the information but I can’t find them as entities`
I was looking for the sensor that I’m was trying to create .
Yes I’ve a smart meter installed but till now I didn’t found the sensor that shows the energy returned to the grid
Once i didn’t found from Fronius a sensor that gives the energy returned to grid ,I was trying to create a sensor with the difference of power produced and consumed .
So returned energy is sensor.energy_real_produced_fronius_meter_0_http_<your_ip> (the _http part may not be in your actual entity_id).
The difference of power produced and consumed (this is power, not energy - so not total_increasing) is found in the SolarNet device at sensor.power_grid_fronius_power_flow_0_http_<your_ip> or the inverse sensor.power_load_fronius_power_flow_0_http_<your_ip>. This is positive on net import and negative on net export (the grid one).
Sure power is not energy but the idea is to use platform integration Rieman to transform power into energy .
How can I use sensor.power_load_fronius_power_flow_0_http_<your_ip> in HA energy dashboard for the energy returned only when it’s positive?
Regards
You can’t because its power. I was just pointing this out because of your example in the first post.
As you already said: you would have to use Riemann integration. Or just use sensor.energy_real_produced_fronius_meter_... and sensor.energy_real_consumed_fronius_meter_... for the energy panel. See the documentation Fronius - Home Assistant
If you want to split the energy entity in a positive and negative part use something like this:
# positive values are from grid
from_grid: {{ max(states('sensor.power_grid_fronius_power_flow_0_http_192_168_68_10') | float, 0) }}
# negative values are to grid
to_grid: {{ max((0 - states('sensor.power_grid_fronius_power_flow_0_http_192_168_68_10') | float), 0) }}