Power consumption negative #343
Replies: 13 comments 3 replies
-
Template results are not useful for an issue report. I need to see the actual sensor values, not the calculated results. Upload a diagnostic file when the problem is occurring. Not enough info about your system. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
config_entry-solaredge_modbus_multi-b86bc24f1ca70258f7ffd41889955498.json.txt Diagnostics |
Beta Was this translation helpful? Give feedback.
-
It appears you have a battery: negative inverter power AC/DC values are valid in certain battery charging conditions. Export+Import meters will return positive power values during export and negative values during import. |
Beta Was this translation helpful? Give feedback.
-
Thanks, so how do I get the correct AC value (PV generation) and house consumption (power consumption) then? |
Beta Was this translation helpful? Give feedback.
-
I can't help with that: I don't have a system with batteries personally. |
Beta Was this translation helpful? Give feedback.
-
You might try searching for or asking in discussions, or look at the templates that have been contributed in the wiki to see if they apply to your situation. |
Beta Was this translation helpful? Give feedback.
-
Well I took the battery sample from the Wiki and just replaced the i1 AC/DC values with the combined ones. So something is wrong with the sample from the Wiki if this is the power consumption and the AC value can be negative: |
Beta Was this translation helpful? Give feedback.
-
This issue was opened as power should always be positive, but that's not the case: power can be positive or negative depending on what it's indicating. So as far as an issue report this is resolved. Template stuff I would defer to discussions where someone who has experience with calculations related to batteries might be able to help. Again, I don't have batteries, so I can't really help with anything battery related outside the integration. This discussion has a lot of battery related template stuff: https://community.home-assistant.io/t/solaredge-modbus-configuration-for-single-inverter-and-battery/464084 |
Beta Was this translation helpful? Give feedback.
-
When In your case, with 2 inverters, the power that is flowing into inverter 1 battery could be (a looks like it is in your graph) coming from inverter 2. The net of inverter 1 AC power, inverter 2 AC power and the grid meter should all still work out to be the load consumption though. What you're likely seeing though is spikes due to different sampling frequency / times to the 2 inverters. This happens, to a lesser extent, with single inverter / single meter systems where the meter and inverter registers are sampled milliseconds apart - so you do not get an atomic snapshot of the system state. So, your best bet is probably to filter / smooth the raw data from each inverter before using it in the calculations. |
Beta Was this translation helpful? Give feedback.
-
I'm not entirely sure what to make of the first part of the graph where the two inverters are showing opposite DC power: maybe the power from I1 is being used to charge the battery on I2? According to the diagnostic file there's only one battery and it's attached to I2. Edit: I read it wrong, battery is on I1. |
Beta Was this translation helpful? Give feedback.
-
The battery is DC attached to inverter 1 but can be AC charged from inverter 2 as well. |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
Especially in the morning, when the second inverter is not active yet, I get negative power consumption. The panels for the second inverter (ID 2) are southward facing, so it switches on later than then main inverter (ID 1).
Expected behavior
Power consumption should always be positive
Screenshots

Grafana dashboard
Logs
Not related but anyway:
Debug Logs
Home Assistant (please complete the following information):
Additional context
I have 2 inverters so I combine the AC value like that:
`
unique_id: "power_ac_total"
unit_of_measurement: "W"
device_class: "power"
state_class: "measurement"
icon: "mdi:solar-power"
state: "{{ float(states('sensor.solaredge_modbus_i1_ac_power'), 0) + float(states('sensor.solaredge_modbus_i2_ac_power'), 0) }}" `
Power consumption:
`
unit_of_measurement: "W"
device_class: "power"
state_class: "measurement"
# The net of inverter and grid power
state: "{{ float(states('sensor.power_ac_total'), 0) - float(states('sensor.solaredge_modbus_m1_ac_power'), 0) }}"`
Beta Was this translation helpful? Give feedback.
All reactions