这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@andrewfg
Copy link
Contributor

When you CREATE a new scene in the Hue app, it checks for already existing scenes having the same name. So normally it is impossible to create duplicate scenes with the same name.

However there is a bug in the Hue app whereby if you EDIT a scene, it wrongly allows you to rename the scene to the same name as another existing scene. And when OH tries to load the scenes for such a particular thing, it throws a Collectors.duplicateKeyException.

This PR eliminates that Collectors.duplicateKeyException.

Main UI does not permit drop down selectors to have multiple choices with the same text, so the second scene instance is simply not added to the list.

Signed-off-by: Andrew Fiddian-Green software@whitebear.ch

@andrewfg andrewfg added the bug An unexpected problem or unintended behavior of an add-on label Nov 29, 2023
@andrewfg andrewfg requested a review from jlaur November 29, 2023 17:54
@andrewfg andrewfg self-assigned this Nov 29, 2023
@andrewfg andrewfg requested a review from cweitkamp as a code owner November 29, 2023 17:54
Copy link
Contributor

@jlaur jlaur left a comment

Choose a reason for hiding this comment

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

LGTM

@jlaur jlaur merged commit 73ec188 into openhab:main Nov 29, 2023
@jlaur jlaur added this to the 4.1 milestone Nov 29, 2023
@jlaur jlaur changed the title [hue] Fix bug due to identical scene names [hue] Fix handling of identical scene names Nov 29, 2023
@jlaur jlaur changed the title [hue] Fix handling of identical scene names [hue] Fix handling of identical scene names (API v2) Nov 29, 2023
austvik pushed a commit to austvik/openhab-addons that referenced this pull request Mar 27, 2024
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
@andrewfg andrewfg deleted the hue-identical-scene-names branch August 25, 2024 15:52
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