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

[Smhi] Ensure trailing zeroes are removed before updating channels #11353

Merged
merged 2 commits into from
Oct 16, 2021

Conversation

pacive
Copy link
Member

@pacive pacive commented Oct 6, 2021

Avoids issues with e.g map transformations.

Signed-off-by: Anders Alfredsson andersb86@gmail.com

…transformations.

Signed-off-by: Anders Alfredsson <andersb86@gmail.com>
@pacive pacive added the bug An unexpected problem or unintended behavior of an add-on label Oct 6, 2021
@pacive pacive changed the title Ensure trailing zeroes are removed before updating channels [Smhi] Ensure trailing zeroes are removed before updating channels Oct 6, 2021
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.

Are you sure that it will be ok in case your value is 200.0 for example ?

Signed-off-by: Anders Alfredsson <andersb86@gmail.com>
@pacive
Copy link
Member Author

pacive commented Oct 10, 2021

Are you sure that it will be ok in case your value is 200.0 for example ?

Did a bit of testing, and it should work as intended, but decided to use setScale() instead, to get a more accurate value regardless.

@pacive pacive added rebuild Triggers Jenkins PR build and removed rebuild Triggers Jenkins PR build labels Oct 10, 2021
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

@lolodomo lolodomo merged commit 1e57450 into openhab:main Oct 16, 2021
@lolodomo lolodomo added this to the 3.2 milestone Oct 16, 2021
@pacive pacive deleted the smhi-fix branch October 16, 2021 19:47
frederictobiasc pushed a commit to frederictobiasc/openhab-addons that referenced this pull request Oct 26, 2021
…penhab#11353)

* Ensure unnecessary trailing zeroes are removed, to avoid issues with transformations.

Signed-off-by: Anders Alfredsson <andersb86@gmail.com>

* Change to use setScale()

Signed-off-by: Anders Alfredsson <andersb86@gmail.com>
dschoepel pushed a commit to dschoepel/openhab-addons that referenced this pull request Nov 9, 2021
…penhab#11353)

* Ensure unnecessary trailing zeroes are removed, to avoid issues with transformations.

Signed-off-by: Anders Alfredsson <andersb86@gmail.com>

* Change to use setScale()

Signed-off-by: Anders Alfredsson <andersb86@gmail.com>
Signed-off-by: Dave J Schoepel <dave@theschoepels.com>
NickWaterton pushed a commit to NickWaterton/openhab-addons that referenced this pull request Dec 30, 2021
…penhab#11353)

* Ensure unnecessary trailing zeroes are removed, to avoid issues with transformations.

Signed-off-by: Anders Alfredsson <andersb86@gmail.com>

* Change to use setScale()

Signed-off-by: Anders Alfredsson <andersb86@gmail.com>
Signed-off-by: Nick Waterton <n.waterton@outlook.com>
nemerdaud pushed a commit to nemerdaud/openhab-addons that referenced this pull request Jan 28, 2022
…penhab#11353)

* Ensure unnecessary trailing zeroes are removed, to avoid issues with transformations.

Signed-off-by: Anders Alfredsson <andersb86@gmail.com>

* Change to use setScale()

Signed-off-by: Anders Alfredsson <andersb86@gmail.com>
marcfischerboschio pushed a commit to bosch-io/openhab-addons that referenced this pull request May 5, 2022
…penhab#11353)

* Ensure unnecessary trailing zeroes are removed, to avoid issues with transformations.

Signed-off-by: Anders Alfredsson <andersb86@gmail.com>

* Change to use setScale()

Signed-off-by: Anders Alfredsson <andersb86@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants