Energy - support net metering - import/export as one measurement for Eastron SDM630

For energy metering I have to define seperated energy meters for import and export of energy.

I like to be able to configure in energy configuration an energy meter that support one measurment that can ascend and descent to allow net metering.

Background:

In Germany we measure net power. Net power is the sum of power on line 1, 2 and 3.
Example:
L1: 50W
L2: 100W
L2: -200W
net= -50W

The famous and cheap energy meter Eastron SDM630 provides net energy consumption as one measurement. E.g. above example with -50W (export) will decrease kWh value.

On picture you see me cooking lunch at 13:06 :wink:

Modbus definition for SDM630’S “net kWh” is:

- address: 396
  count: 2
  data_type: float32
  input_type: input
  name: Net kWh
  precision: 3
  slave: 1
  unit_of_measurement: kWh