power-flow-card-plus
power-flow-card-plus copied to clipboard
Resolving Total Energy Calculation: Excluding Solar and Battery Contributions
I'm using EcoFlow, with both the powerstream and solar panel plugged into the Delta Pro. Additionally, I have a double Anker Solix kit.
Both of these setups return values that are integrated into the house using the sensor.solarinverters, which combines the outputs of two Shelly plugs into one sensor.
However, I've encountered an issue where the grid usage includes the energy from the battery. This happens because the battery's energy is reinjected into the house behind the fuse box, and it only flows back to the grid when in a negative value.
Regarding the solar panels, I assume they contribute to the sensor.solarinverters since they utilize the same Shelly plug.
My main challenge lies in finding a way to display this information without adding the battery's value to the home area.
sensor available: Delta Pro Battery Level: sensor.deltapro_battery_level Solar IN: sensor.deltapro_solar_in_power Total IN power: sensor.deltapro_total_in_power Total Out Power: sensor.deltapro_total_out_power
PowerStream: Battery input Watts : sensor.powerstream_battery_input_watts (which I think is negative while charging positive while disharging) inverter output watts: sensor.powerstream_inverter_output_watts SmartLoad (Partial electricity usage of the house) sensor.powerstream_smart_plug_loads Other Load: sensor.powerstream_other_loads (add to the smartload deliberately).
Shelly Plug
AnkerSolix (plug behind the inverter): sensor.ankersolar_switch_0_power Powerstream output (plug behind the inverter): sensor.shellyplusplugs_b0b21c1ab758_switch_0_power Household (including solar injection): sensor.electric_meter_channel_1_power
custom sensor
net_electricity_usage: (Household usage + solar injection)
friendly_name: "Net Electricity Usage"
unit_of_measurement: "kWh"
value_template: "{{ (states('sensor.electric_meter_channel_1_power') | float) + (states('sensor.solarinverters') | float) }}"
solarinverters: (the power of both inverter together)
friendly_name: "Solar Inverters"
unit_of_measurement: "W"
value_template: "{{ states('sensor.ankersolar_switch_0_power')|float + states('sensor.shellyplusplugs_b0b21c1ab758_switch_0_power')|float }}"
total_solar_production: (total solar for ecoflow)
friendly_name: "Full solar production"
value_template: "{{ states('sensor.powerstream_solar_1_watts') | float + states('sensor.powerstream_solar_2_watts') | float + states('sensor.deltapro_solar_in_power') | float }}"
unit_of_measurement: "W"
sensors:
battery_power_combined: (full battery IN for ecoflow)
friendly_name: "Combined Battery Power"
unit_of_measurement: "W"
value_template: "{{ states('sensor.powerstream_battery_input_watts') | float + states('sensor.deltapro_total_in_power') | float }}"