Skip to content

Add range check for temperature and humidity#32

Open
henryk wants to merge 3 commits into
Bluetooth-Devices:mainfrom
henryk:patch-1
Open

Add range check for temperature and humidity#32
henryk wants to merge 3 commits into
Bluetooth-Devices:mainfrom
henryk:patch-1

Conversation

@henryk

@henryk henryk commented Jan 15, 2025

Copy link
Copy Markdown

Adds a check to guard against physically impossible reported values. Temperatures below absolute zero, or humidity outside 0-100 %, likely are the result of an invalid received packet and should be disregarded (disregard entire packet, other data probably also wrong).

henryk and others added 3 commits January 15, 2025 17:26
Adds a check to guard against physically impossible reported values. Temperatures below absolute zero, or humidity outside 0-100 %, likely are the result of an invalid received packet and should be disregarded (disregard entire packet, other data probably also wrong).

@bdraco bdraco left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR.

Please add test coverage for these new cases.

@bdraco

bdraco commented Feb 11, 2025

Copy link
Copy Markdown
Member

@henryk Do you expect to finish this PR?

Thanks

@henryk

henryk commented Feb 11, 2025

Copy link
Copy Markdown
Author

Hi, yes, sorry. I couldn't immediately figure out how the test cases work and how I would even add a new one and then it slid off my radar due to work. I'll find some time this week.

@upsuper

upsuper commented Feb 7, 2026

Copy link
Copy Markdown
Contributor

If the problem you wanted to fix is home-assistant/core#161143, it should now have been fixed by #153 in a more specific way.

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.

3 participants