Hello.
One physical apartment has been divided into two smaller residences (called flat “1” and “2”) but from energy supply company this is still one apartment.
Internally has been added sub-energy meter for flat “2” and divided electricity zones to each of two flats. So I have:
-one main energy meter as sum 1+2 flats
- one sub-energy meter for flat “2” only
To better calculate energy for flat no “1” (as calculation “1+2” - “2” = “1”) I build sensor template as below and call it “1 ZE BR raw”:
{% set main= states('sensor.energa_my_meter_30426461_from_grid_strefa_1') | float(0) %}
{% set lok2 = states('sensor.0xa4c138f6afc53028_energy') | float(0) %}
{{ (main- lok2) | round(3) }}
and next based on it build finally energy state as utility meter sensor “1 ZE BR”:
THE ISSUE
All working fine until sub-meter assigned to flat “2” became temporary unavailable like today:
This create a hight peak (is equal to current energy value, in my cause about 175 kWh). When the flat “2” sub-energy meter become available back to correct state then the peak value back to correct value
But finally my virtual final calculated energy flat "1 meter register it and add (in my case about 175 kWh):
How to prevent doing this? The value are nonsense now. Please help.
BR, Krzysiek






