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

[hue] Use system default channel types for lights #9856

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,6 @@ thing-type.config.hue.geofencesensor.on.label = Sensor Status
thing-type.config.hue.geofencesensor.on.description = Aktiviert oder deaktiviert den Sensor.

# channel types
channel-type.hue.color.label = Farbe
channel-type.hue.color.description = Erm�glicht die Steuerung der Farbe. Erm�glicht ebenfalls die Lampe zu dimmen oder ein- und auszuschalten.
channel-type.hue.brightness.label = Helligkeit
channel-type.hue.brightness.description = Erm�glicht die Steuerung der Helligkeit. Erm�glicht ebenfalls die Lampe ein- und auszuschalten.
channel-type.hue.switch.label = Schalter
channel-type.hue.switch.description = Erm�glicht das Ein- und Ausschalten.
channel-type.hue.color_temperature.label = Farbtemperatur
channel-type.hue.color_temperature.description = Erm�glicht die Steuerung der Farbtemperatur. Von Tageslichtwei� (0) bis Warmwei� (100).
channel-type.hue.alert.label = Alarm
channel-type.hue.alert.description = Erm�glicht ein tempor�res Blinken.
channel-type.hue.alert.state.option.NONE = Kein Blinken
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,6 @@ thing-type.config.hue.group.groupId.label = ID groupe
thing-type.config.hue.group.groupId.description = L'identifiant de groupe identifie l'un des groupes d'ampoules hue ou une pi�ce.

# channel types
channel-type.hue.color.label = Couleur
channel-type.hue.color.description = Permet de contr�ler la couleur de l'ampoule. Il est �galement possible d'allumer ou d'�teindre l'ampoule ainsi que de faire varier son intensit� lumineuse.
channel-type.hue.brightness.label = Intensit� lumineuse
channel-type.hue.brightness.description = Permet de contr�ler l'intensit� lumineuse de l'ampoule. Il est �galement possible d'allumer ou d'�teindre l'ampoule.
channel-type.hue.switch.label = Commutateur
channel-type.hue.switch.description = Permet d'allumer ou d'�teindre l'ampoule.
channel-type.hue.color_temperature.label = Temp�rature couleur
channel-type.hue.color_temperature.description = Permet de choisir la temp�rature de couleur de l'ampoule entre 0 (froid) et 100 (chaud).
channel-type.hue.alert.label = Mode alerte
channel-type.hue.alert.description = Permet un changement temporaire de l'�tat de l'ampoule.
channel-type.hue.alert.state.option.NONE = Sans alerte
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<description>A dimmable light with changeable colors.</description>

<channels>
<channel id="color" typeId="color"/>
<channel id="color" typeId="system.color"/>
<channel id="alert" typeId="alert"/>
<channel id="effect" typeId="effect"/>
</channels>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<description>A dimmable light with tunable color temperature.</description>

<channels>
<channel id="color_temperature" typeId="color_temperature"/>
<channel id="brightness" typeId="brightness"/>
<channel id="color_temperature" typeId="system.color-temperature"/>
<channel id="brightness" typeId="system.brightness"/>
<channel id="alert" typeId="alert"/>
<channel id="effect" typeId="effect"/>
</channels>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<description>A dimmable light.</description>

<channels>
<channel id="brightness" typeId="brightness"/>
<channel id="brightness" typeId="system.brightness"/>
<channel id="alert" typeId="alert"/>
</channels>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<description>An outlet that can be dimmed.</description>

<channels>
<channel id="brightness" typeId="brightness"/>
<channel id="brightness" typeId="system.brightness"/>
</channels>

<representation-property>uniqueId</representation-property>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<description>A dimmable light with changeable colors and tunable color temperature.</description>

<channels>
<channel id="color" typeId="color"/>
<channel id="color_temperature" typeId="color_temperature"/>
<channel id="color" typeId="system.color"/>
<channel id="color_temperature" typeId="system.color-temperature"/>
<channel id="alert" typeId="alert"/>
<channel id="effect" typeId="effect"/>
</channels>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
<description>A group of lights or a room that could be switched on and off.</description>

<channels>
<channel id="switch" typeId="switch"/>
<channel id="color_temperature" typeId="color_temperature"/>
<channel id="brightness" typeId="brightness"/>
<channel id="color" typeId="color"/>
<channel id="switch" typeId="system.power"/>
<channel id="color_temperature" typeId="system.color-temperature"/>
<channel id="brightness" typeId="system.brightness"/>
<channel id="color" typeId="system.color"/>
<channel id="alert" typeId="alert"/>
<channel id="scene" typeId="scene"/>
</channels>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<description>A light that could be switched on and off.</description>

<channels>
<channel id="switch" typeId="switch"/>
<channel id="switch" typeId="system.power"/>
<channel id="alert" typeId="alert"/>
</channels>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<description>An outlet that could be switched on and off.</description>

<channels>
<channel id="switch" typeId="switch"/>
<channel id="switch" typeId="system.power"/>
</channels>

<representation-property>uniqueId</representation-property>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,6 @@
xmlns:thing="https://openhab.org/schemas/thing-description/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd">

<!-- Color Channel -->
<channel-type id="color">
<item-type>Color</item-type>
<label>Color</label>
<description>The color channel allows to control the color of a light.
It is also possible to dim values and switch the
light on and off.
</description>
<category>ColorLight</category>
<tags>
<tag>Lighting</tag>
</tags>
</channel-type>
Copy link
Contributor Author

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();


<!-- Brightness Channel -->
<channel-type id="brightness">
<item-type>Dimmer</item-type>
<label>Brightness</label>
<description>The brightness channel allows to control the brightness of a light.
It is also possible to switch the
light on and off.
</description>
<category>Light</category>
<tags>
<tag>Lighting</tag>
</tags>
</channel-type>
Copy link
Contributor Author

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();


<channel-type id="last_updated">
<item-type>DateTime</item-type>
<label>Last Updated</label>
Expand Down Expand Up @@ -147,18 +119,6 @@
</event>
</channel-type>

<!-- Switch Channel -->
<channel-type id="switch">
<item-type>Switch</item-type>
<label>Switch</label>
<description>The switch channel allows to switch the light on and off.
</description>
<category>Light</category>
<tags>
<tag>Lighting</tag>
</tags>
</channel-type>
Copy link
Contributor Author

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 Channel -->
<channel-type id="temperature">
<item-type>Number:Temperature</item-type>
Expand All @@ -168,16 +128,6 @@
<state readOnly="true" pattern="%.1f %unit%"/>
</channel-type>

<!-- Color Temperature Channel -->
<channel-type id="color_temperature">
<item-type>Dimmer</item-type>
<label>Color Temperature</label>
<description>The color temperature channel allows to set the color
temperature of a light from 0 (cold) to 100 (warm).
</description>
<category>ColorLight</category>
</channel-type>
Copy link
Contributor Author

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();


<!-- Alert Channel -->
<channel-type id="alert" advanced="true">
<item-type>String</item-type>
Expand Down