Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate failsafe for incrementing sensors #38

Open
endor-force opened this issue Feb 13, 2022 · 1 comment
Open

Investigate failsafe for incrementing sensors #38

endor-force opened this issue Feb 13, 2022 · 1 comment

Comments

@endor-force
Copy link
Contributor

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.

@newlund
Copy link

newlund commented Mar 15, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants