Open endor-force opened 2 years ago
I also have this problem. To avoid this I have now added a filter section to the sensor I use to track total energy consumption.
sensors:
- name: "Cumulative Active Import"
unit_of_measurement: kWh
accuracy_decimals: 2
state_class: "total_increasing"
device_class: "energy"
filters:
- filter_out: 0.00
Don't know if it will work but worth a try... Make sure correct number of decimals are specified. I have data with two decimals so I filter out 0.00
Yesterday i discovered a peak of ~3500kwh during one hour. It turns out that the sensor value received or parsed in to home assistant was 0 and then the following state was ~3500kwh from the cumulative active import sensor. This caused the strange error of the usage data in electricity sensor in home assistant. Needed to clean up and fix values in states and statistics table in home assistant to correct the problem.
Check if failsafe can be added i.e. do not send sensor value if it is null or 0 to avoid this error.