Skip to content

Add range check for temperature and humidity#32

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

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

Conversation

@henryk
Copy link
Copy Markdown

@henryk henryk commented Jan 15, 2025

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).
Copy link
Copy Markdown
Member

@bdraco bdraco left a comment

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
Copy link
Copy Markdown
Member

bdraco commented Feb 11, 2025

@henryk Do you expect to finish this PR?

Thanks

@henryk
Copy link
Copy Markdown
Author

henryk commented Feb 11, 2025

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
Copy link
Copy Markdown
Contributor

upsuper commented Feb 7, 2026

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