Incorrect output of measurement data from the electricity meter and the inverter

Hello everyone,
I’m new to the forum and I have a question regarding the correct output of the readings from my electricity meter.
If my solar system does not supply any electricity, the values ​​​​which are output from the electricity meter are correct. If the solar system delivers less, they are still correct. If more electricity is produced than consumed, the difference display´s as consumption.
Is there a way to edit the sensor of the meter in such a way that if the energy generated exceeds the consumption, it returns the value 0? I use the Frient frient electricity meter interface for my meter and I receive the photovoltaic data via the Shine app.

Here for example: The first value ist the Power consumtion which is now incorrect.
The second value ist the produced electricity.
The right consumtion would be 636,3 - 523 = 113,3 whitch should be displayed as 0 because i don´t buy it from my energy provider.

image

Thank you for your help and greetings from Austria,
Patrick

I was thinking of some kind of “if” formula like for example:

if powerconsumtion <= production than 0 otherwise powerconsumtion minus production

unfortunately I can’t find such a function anywhere to create this sensor

Which HA integration are you using?

I use my Plant by Growatt for my inverter and zigbee home automation via a usb dongle for my energy meter

It may be possible to edit the sensor of your meter to display a value of 0 when the energy generated exceeds the consumption. However, this would likely require technical expertise and may not be possible with the Frient frient electricity meter interface or the Shine app. Which inverter do you use? You can try Firman W03083 You can keep track of your energy usage and production to ensure that you’re maximizing the benefits of your solar system.

Thanks for your input :wink: I use the 750W inverter of Growatt whitch is connected via a wifi dongle. I thought there would be an easy option for me as HASS beginner without a lot of programming :wink: if there is no option with my devices thats no problem at all :slight_smile: The Firman is a gas powerd inverter not a solar powered right?

Have you tried this? Growatt - Home Assistant

I googled “frient electricity meter” and the result confirmed my first thought. It just can’t know which way the electricity flows, as it does everything by counting blinks. It seems that your actual electricity meter blinks in both directions. LEDs can’t “blink backwards”, so +500 watts looks just the same as -500 watts.

Even some iot-electricity meters with current clamps can’t differentiate which way the amps go and have the same problem. (those should also get the voltage waveform for at least one phase to determine which way the current flows.)

It’s pretty much impossible to fix that in code and installing better metering to get the same current and voltage that the utility companys meter see would be electrical work and probably something that non electrician should not attempt.

Thanks everybody for your great research. Than i have to live with the wrong output since there is something which works for me :slight_smile: