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

[sitemap] Do not try to convert item state into OnOffType for Switch widget if item has options #4226

Merged
merged 1 commit into from
May 13, 2024

Conversation

lolodomo
Copy link
Contributor

When the Switch widget has mappings or when the item has a state description with options, the Switch widget is rendered by UIs with buttons. There was no state conversion into OnOffType when the switch widget has mappings. But when the item has a state description with options, it was wrongly converted into OnOffType.

See this community discussion for an example:
https://community.openhab.org/t/item-statedescription-and-sitemaps/155935

Signed-off-by: Laurent Garnier lg.hc@free.fr

…widget if item has options

When the Switch widget has mappings or when the item has a state description with options, the Switch widget is rendered by UIs with buttons.
There was no state conversion into OnOffType when the switch widget has mappings.
But when the item has a state description with options, it was wrongly converted into OnOffType.

See this community discussion for an example:
https://community.openhab.org/t/item-statedescription-and-sitemaps/155935

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
@lolodomo lolodomo requested a review from a team as a code owner May 13, 2024 18:32
@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/item-statedescription-and-sitemaps/155935/9

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 bug An unexpected problem or unintended behavior of the Core label May 13, 2024
@J-N-K J-N-K added this to the 4.2 milestone May 13, 2024
@holgerfriedrich holgerfriedrich merged commit 965e731 into openhab:main May 13, 2024
5 checks passed
@lolodomo lolodomo deleted the sitemap_state_number_options branch May 13, 2024 20:40
@lolodomo lolodomo restored the sitemap_state_number_options branch May 13, 2024 20:41
@lolodomo lolodomo deleted the sitemap_state_number_options branch May 13, 2024 20:41
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 the Core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants