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

Add NumberItem#range #352

Merged
merged 1 commit into from
Oct 11, 2024
Merged

Add NumberItem#range #352

merged 1 commit into from
Oct 11, 2024

Conversation

ccutrer
Copy link
Contributor

@ccutrer ccutrer commented Oct 10, 2024

Returns a Range from a state description, and applies units if possible

@ccutrer ccutrer requested a review from jimtng October 10, 2024 20:04
Copy link
Contributor

@jimtng jimtng left a comment

Choose a reason for hiding this comment

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

This may fail on ruby 2.6 (jruby 9.3) afaik it doesn't support beginless range, but I'm fine with that.

lib/openhab/core/items/number_item.rb Outdated Show resolved Hide resolved
Returns a Range from and stated description, and applies units if possible

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

ccutrer commented Oct 11, 2024

This may fail on ruby 2.6 (jruby 9.3) afaik it doesn't support beginless range, but I'm fine with that.

Yes, I was quite aware of that (and thus why I only wrote a spec for an endless range...). In the unlikely event someone on openHAB 3.4 tries to use this feature and has issues, we can recommend they install the JRuby 9.3 version of the add-on from the community marketplace.

@ccutrer ccutrer merged commit b67db63 into openhab:main Oct 11, 2024
21 checks passed
@ccutrer ccutrer deleted the number_item-range branch October 11, 2024 16:32
@jimtng jimtng added the enhancement New feature or request label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants