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

Expose Channel Type UIDs of default System Channel Types #2361

Merged

Conversation

cweitkamp
Copy link
Contributor

  • Expose Channel Type UIDs of default System Channel Types

https://github.com/openhab/openhab-addons/blob/e1a76505a07f9d329f046a7e3f41ddf9a6360247/bundles/org.openhab.binding.deconz/src/main/java/org/openhab/binding/deconz/internal/handler/SensorBaseThingHandler.java#L186-L191

The advantage of this is that bindings do not need to create the ChannelTypeUIDs on there own but can reuse the exposed constants. Additionally bundles can use them for defining Profiles.

public ProfileTypeBuilder<T> withSupportedChannelTypeUIDs(ChannelTypeUID... channelTypeUIDs) {

public ProfileTypeBuilder<T> withSupportedChannelTypeUIDs(Collection<ChannelTypeUID> channelTypeUIDs) {

Signed-off-by: Christoph Weitkamp [email protected]

@cweitkamp cweitkamp added the enhancement An enhancement or new feature of the Core label May 13, 2021
@cweitkamp cweitkamp requested a review from a team as a code owner May 13, 2021 10:21
Copy link
Member

@wborn wborn left a comment

Choose a reason for hiding this comment

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

Seems useful indeed! 👍

@wborn wborn merged commit 66525af into openhab:main May 14, 2021
@wborn wborn added this to the 3.1 milestone May 14, 2021
@cweitkamp cweitkamp deleted the feature-expose-system-channel-type-uids branch May 14, 2021 10:38
fwolter pushed a commit to fwolter/openhab-core that referenced this pull request May 24, 2021
splatch pushed a commit to ConnectorIO/copybara-hab-core that referenced this pull request Jul 11, 2023
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants