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

[mqtt] Interpet incoming NaN as UNDEF for NumberValues #15897

Merged
merged 2 commits into from
Dec 10, 2023

Conversation

ccutrer
Copy link
Contributor

@ccutrer ccutrer commented Nov 14, 2023

Since DecimalType and QuantityType don't support NaN, but when you're linking to a topic that the device is using floating point, NaN might happen.

@ccutrer ccutrer requested a review from a team as a code owner November 14, 2023 15:26
@ccutrer ccutrer marked this pull request as draft November 14, 2023 16:20
Since DecimalType and QuantityType don't support NaN, but
when you're linking to a topic that the device is using
floating point, NaN might happen.

Signed-off-by: Cody Cutrer <cody@cutrer.us>
@ccutrer ccutrer marked this pull request as ready for review November 20, 2023 22:09
@ccutrer ccutrer requested review from lolodomo and antroids November 27, 2023 18:22
@ccutrer
Copy link
Contributor Author

ccutrer commented Nov 27, 2023

@antroids: this is actually coming from a Home Assistant compatible device (ESPHome)

Signed-off-by: Cody Cutrer <cody@cutrer.us>
Copy link
Contributor

@antroids antroids left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Copy link
Contributor

@lolodomo lolodomo left a comment

Choose a reason for hiding this comment

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

LGTM, thank you

@lolodomo lolodomo merged commit c3660e2 into openhab:main Dec 10, 2023
3 checks passed
@lolodomo lolodomo added the enhancement An enhancement or new feature for an existing add-on label Dec 10, 2023
@lolodomo lolodomo added this to the 4.1 milestone Dec 10, 2023
@ccutrer ccutrer deleted the mqtt-nan branch December 11, 2023 19:48
austvik pushed a commit to austvik/openhab-addons that referenced this pull request Mar 27, 2024
* [mqtt] Interpet incoming NaN as UNDEF for NumberValues

Since DecimalType and QuantityType don't support NaN, but
when you're linking to a topic that the device is using
floating point, NaN might happen.

---------

Signed-off-by: Cody Cutrer <cody@cutrer.us>
Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
joni1993 pushed a commit to joni1993/openhab-addons that referenced this pull request Oct 15, 2024
* [mqtt] Interpet incoming NaN as UNDEF for NumberValues

Since DecimalType and QuantityType don't support NaN, but
when you're linking to a topic that the device is using
floating point, NaN might happen.

---------

Signed-off-by: Cody Cutrer <cody@cutrer.us>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants