-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[hue] Use system default channel types for lights #9856
[hue] Use system default channel types for lights #9856
Conversation
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
Are these changes backwards compatible? |
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cpmeister A comparison:
One thing we will lose is the "Lighting" tag form some channel types which imo is not relevant anymore. Semantics are using the "Light" tag.
The more detailed descriptions for the channels types can be backported to OHC.
<tags> | ||
<tag>Lighting</tag> | ||
</tags> | ||
</channel-type> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public static final ChannelType SYSTEM_COLOR = ChannelTypeBuilder
.state(new ChannelTypeUID(BINDING_ID, "color"), "Color", "Color")
.withDescription("Controls the color of the light").withCategory("ColorLight").build();
<tags> | ||
<tag>Lighting</tag> | ||
</tags> | ||
</channel-type> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public static final ChannelType SYSTEM_POWER = ChannelTypeBuilder
.state(new ChannelTypeUID(BINDING_ID, "power"), "Power", "Switch")
.withDescription("Device is operable when channel has state ON").withCategory("Switch").build();
temperature of a light from 0 (cold) to 100 (warm). | ||
</description> | ||
<category>ColorLight</category> | ||
</channel-type> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public static final ChannelType SYSTEM_COLOR_TEMPERATURE = ChannelTypeBuilder
.state(new ChannelTypeUID(BINDING_ID, "color-temperature"), "Color Temperature", "Dimmer")
.withDescription("Controls the color temperature of the light").withCategory("ColorLight")
.withStateDescriptionFragment(StateDescriptionFragmentBuilder.create().withMinimum(BigDecimal.ZERO)
.withMaximum(new BigDecimal(100)).withPattern("%d").build())
.build();
<tags> | ||
<tag>Lighting</tag> | ||
</tags> | ||
</channel-type> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public static final ChannelType SYSTEM_BRIGHTNESS = ChannelTypeBuilder
.state(new ChannelTypeUID(BINDING_ID, "brightness"), "Brightness", "Dimmer")
.withDescription("Controls the brightness and switches the light on and off").withCategory("Light")
.withStateDescriptionFragment(StateDescriptionFragmentBuilder.create().withMinimum(BigDecimal.ZERO)
.withMaximum(new BigDecimal(100)).withPattern("%d %%").build())
.build();
Yes, it is. For managed Things the Channel Type is stored in JSON storage and will not be changed accordingly. To solve your issue you have to delete and recreate your Thing. |
Thank you very much for the quick answer! |
* Use system default channel types for lights Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de> Signed-off-by: John Marshall <john.marshall.au@gmail.com>
* Use system default channel types for lights Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/hue-channels-for-light-items-disappeared/124411/19 |
* Use system default channel types for lights Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
Signed-off-by: Christoph Weitkamp github@christophweitkamp.de