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

Ignore "non-value" attribute values for sensors #414

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

puddly
Copy link
Contributor

@puddly puddly commented Apr 10, 2025

Zigpy currently provides a way to determine if a value is a "non-value" for a type. This is easily supported for numeric types but not so much for more complex ones, like arrays and such. This PR will globally fix invalid sensor readings showing up in the frontend.

Copy link

codecov bot commented Apr 10, 2025

Codecov Report

Attention: Patch coverage is 83.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 96.66%. Comparing base (2e8fbe8) to head (4d9b897).

Files with missing lines Patch % Lines
zha/application/platforms/sensor/__init__.py 83.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #414      +/-   ##
==========================================
- Coverage   96.68%   96.66%   -0.02%     
==========================================
  Files          61       61              
  Lines        9834     9840       +6     
==========================================
+ Hits         9508     9512       +4     
- Misses        326      328       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@oddlama
Copy link

oddlama commented Apr 13, 2025

Since this is a draft, can I use this to patch my local instance and test it, or do you consider it work in progress?

@puddly
Copy link
Contributor Author

puddly commented Apr 13, 2025

Sure! I haven't written unit tests for it but have tested it at runtime with a device.

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

Successfully merging this pull request may close these issues.

2 participants