Correct Energy Pricing Calculation with Simultaneous Production and Consumption

Hello everyone, I’m trying to figure out how to correctly calculate the energy pricing when my smart meter provides simultaneous production and consumption values. This is becoming crucial as my setup with solar panels and batteries is about to be affected by these new readings. Let me walk you through my understanding and the challenges I’m facing.First, my smart meter in the Netherlands provides readings for each phase, separately for production and consumption. Previously, I only had net flows, which made calculating the economic balance straightforward. However, with the new readings, I have both production and consumption values for each phase, which complicates things.For example, if I have a house with three phases:- L1: +1 kW (production)- L2: -1 kW (consumption)- L3: -1 kW (consumption)Old readings would show:- Consumption: 0 kW- Production: 1 kWNow, the new readings are:- Consumption: 1 kW- Production: 2 kWWith a dynamic tariff where I pay the market price plus a transfer fee on net flows, regardless of direction, the calculation becomes tricky. Let’s say the market price is 10 cents/kWh and the transfer fee is 2 cents/kWh. The correct economic balance should be 8 cents, but my current setup in Home Assistant (HA) calculates it as 4 cents. This discrepancy is concerning and needs fixing.In HA, I have separate production and consumption prices based on the market price. I set these in the Energy dashboard as prices for selling and buying. The old readings worked perfectly because they only provided net values. Now, with simultaneous production and consumption, HA is calculating the expenses and income separately, leading to an incorrect balance.I need to find a way to adjust the pricing calculation so that it reflects the net flows accurately. This might involve modifying how HA interprets the production and consumption values or finding a workaround in the Energy dashboard settings. I’m hoping someone in the community has encountered this issue and can share their solution or insights.This problem is not just theoretical for me; it directly impacts my monthly energy costs and the efficiency of my solar setup. Getting this right is essential for accurate budgeting and maximizing the benefits of my renewable energy sources.I’m curious to hear how others are handling similar situations, especially with dynamic tariffs. Are there any scripts, custom components, or alternative dashboards that can handle simultaneous production and consumption readings more effectively? Any advice or shared experiences would be greatly appreciated.Let’s work together to find a solution that ensures the correct economic balance is calculated, reflecting the true net flows of energy in my home. Your insights could help not just me, but others facing the same challenge as smart meters become more prevalent with advanced readings.