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

[rest] Add unit to item response #3654

Merged
merged 1 commit into from
Jul 14, 2023
Merged

Conversation

mherwege
Copy link
Contributor

This extends the enrichedItemDTO with a unitSymbol field, representing the default unit for a number item. This would be the value configured in unit metadata or the default for the dimension.

This field is required to better support sitemap input widgets in apps. When no unit is provided in the label pattern or state description, it allows the input widget to show the default unit symbol. Combined with #3644 this would allow to make the functionality for the input widget equivalent to the proposed functionality for BasicUI.

Signed-off-by: Mark Herwege <[email protected]>
@mherwege mherwege requested a review from a team as a code owner June 13, 2023 07:24
Copy link
Member

@J-N-K J-N-K left a comment

Choose a reason for hiding this comment

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

LGTM

@J-N-K J-N-K added the enhancement An enhancement or new feature of the Core label Jul 14, 2023
@J-N-K J-N-K added this to the 4.0 milestone Jul 14, 2023
@J-N-K J-N-K added the REST/SSE label Jul 14, 2023
@J-N-K J-N-K changed the title Add unitSymbol to item REST [rest] Add unit to item response Jul 14, 2023
@J-N-K J-N-K merged commit f0c0095 into openhab:main Jul 14, 2023
@mherwege mherwege deleted the rest_item_unit branch July 28, 2023 10:17
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 of the Core REST/SSE
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants