Skip to content

[hue] Fix discovery of API v2 unknown archetype devices#20388

Merged
lsiepel merged 3 commits intoopenhab:mainfrom
andrewfg:hue-fix-discovery
Mar 17, 2026
Merged

[hue] Fix discovery of API v2 unknown archetype devices#20388
lsiepel merged 3 commits intoopenhab:mainfrom
andrewfg:hue-fix-discovery

Conversation

@andrewfg
Copy link
Contributor

@andrewfg andrewfg commented Mar 15, 2026

Resolves #20387

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

edit: regression of: #19838

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
@andrewfg andrewfg self-assigned this Mar 15, 2026
@andrewfg andrewfg added bug An unexpected problem or unintended behavior of an add-on regression Regression that happened during the development of a release. Not shown on final release notes. labels Mar 15, 2026
@andrewfg andrewfg requested review from a team and Copilot March 15, 2026 23:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes Hue CLIP v2 discovery regression where devices reporting unknown_archetype were being skipped, restoring discovery for switches/buttons/sensors that no longer provide a specific archetype in firmware updates.

Changes:

  • Stop ignoring UNKNOWN_ARCHETYPE during discovery by adjusting the archetype ignore set.
  • Switch discovery’s “ignore bridge devices” check to use product_data.product_archetype instead of metadata.archetype.
  • Minor adjustment to how discovery labels are selected (preferring metadata name).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
.../discovery/Clip2ThingDiscoveryService.java Updates discovery filtering to no longer skip unknown archetype devices and adjusts label selection logic.
.../dto/clip2/enums/Archetype.java Removes UNKNOWN_ARCHETYPE from the set of archetypes excluded from discovery.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@andrewfg andrewfg removed the bug An unexpected problem or unintended behavior of an add-on label Mar 16, 2026
@andrewfg andrewfg changed the title [hue] Fix discovery of unknown archetype devices [hue] Fix discovery of API v2 unknown archetype devices Mar 16, 2026
Copy link
Contributor

@lsiepel lsiepel left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM

Could you list the PR this is a regression for?

@lsiepel lsiepel merged commit 662f0f7 into openhab:main Mar 17, 2026
2 checks passed
@lsiepel lsiepel added this to the 5.2 milestone Mar 17, 2026
@jlaur
Copy link
Contributor

jlaur commented Mar 17, 2026

Could you list the PR this is a regression for?

I think it's this one: #19838? Before that, only Archetype.BRIDGE_V2 was skipped in discovery. Then it became Archetype.UNKNOWN_ARCHETYPE, Archetype.BRIDGE_V2 and Archetype.BRIDGE_V3. And here, finally Archetype.BRIDGE_V2 and Archetype.BRIDGE_V3.

@jlaur jlaur added the bug An unexpected problem or unintended behavior of an add-on label Mar 17, 2026
@andrewfg
Copy link
Contributor Author

andrewfg commented Mar 18, 2026

Could you list the PR this is a regression for?

@jlaur I think it was indeed #19838

@andrewfg andrewfg deleted the hue-fix-discovery branch March 22, 2026 14:29
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 regression Regression that happened during the development of a release. Not shown on final release notes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[hue] Discovery broken for many device types

4 participants