mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[deconz] color temperature channel improvements (#17777)
Signed-off-by: AndrewFG <software@whitebear.ch> Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
parent
94eb46b3c2
commit
02418d6888
@ -179,7 +179,7 @@ Other devices support
|
||||
| brightness | Dimmer | R/W | Brightness of the light | `dimmablelight`, `colortemperaturelight` |
|
||||
| switch | Switch | R/W | State of a ON/OFF device | `onofflight` |
|
||||
| color | Color | R/W | Color of an multi-color light | `colorlight`, `extendedcolorlight`, `lightgroup` |
|
||||
| color_temperature | Number | R/W | Color temperature in Kelvin. The value range is determined by each individual light | `colortemperaturelight`, `extendedcolorlight`, `lightgroup` |
|
||||
| color_temperature | Number:Temperature | R/W | Color temperature in Kelvin. The value range is determined by each individual light | `colortemperaturelight`, `extendedcolorlight`, `lightgroup` |
|
||||
| effect | String | R/W | Effect selection. Allowed commands are set dynamically | `colorlight` |
|
||||
| effectSpeed | Number | W | Effect Speed | `colorlight` |
|
||||
| lock | Switch | R/W | Lock (ON) or unlock (OFF) the doorlock | `doorlock` |
|
||||
|
@ -123,6 +123,7 @@ public class LightThingHandler extends DeconzBaseThingHandler {
|
||||
|
||||
// minimum and maximum are inverted due to mired/kelvin conversion!
|
||||
StateDescriptionFragment stateDescriptionFragment = StateDescriptionFragmentBuilder.create()
|
||||
.withStep(BigDecimal.valueOf(100)).withPattern("%.0f K")
|
||||
.withMinimum(new BigDecimal(miredToKelvin(ctMax)))
|
||||
.withMaximum(new BigDecimal(miredToKelvin(ctMin))).build();
|
||||
stateDescriptionProvider.setDescriptionFragment(
|
||||
|
@ -113,8 +113,6 @@ channel-type.deconz.carbonmonoxide.label = Carbon-monoxide
|
||||
channel-type.deconz.carbonmonoxide.description = Carbon-monoxide was detected.
|
||||
channel-type.deconz.consumption.label = Consumption
|
||||
channel-type.deconz.consumption.description = Current consumption
|
||||
channel-type.deconz.ct.label = Color Temperature
|
||||
channel-type.deconz.ct.description = Controls the color temperature of the light in Kelvin
|
||||
channel-type.deconz.current.label = Current
|
||||
channel-type.deconz.current.description = Current current
|
||||
channel-type.deconz.dark.label = Dark
|
||||
|
@ -15,12 +15,12 @@
|
||||
<channel typeId="any_on" id="any_on"/>
|
||||
<channel typeId="alert" id="alert"/>
|
||||
<channel typeId="system.color" id="color"/>
|
||||
<channel typeId="ct" id="color_temperature"/>
|
||||
<channel typeId="system.color-temperature-abs" id="color_temperature"/>
|
||||
<channel typeId="scene" id="scene"/>
|
||||
</channels>
|
||||
|
||||
<properties>
|
||||
<property name="thingTypeVersion">1</property>
|
||||
<property name="thingTypeVersion">2</property>
|
||||
</properties>
|
||||
|
||||
<representation-property>uid</representation-property>
|
||||
|
@ -87,13 +87,13 @@
|
||||
<category>Lightbulb</category>
|
||||
<channels>
|
||||
<channel typeId="system.brightness" id="brightness"/>
|
||||
<channel typeId="ct" id="color_temperature"/>
|
||||
<channel typeId="system.color-temperature-abs" id="color_temperature"/>
|
||||
<channel typeId="ontime" id="ontime"/>
|
||||
<channel typeId="alert" id="alert"/>
|
||||
</channels>
|
||||
|
||||
<properties>
|
||||
<property name="thingTypeVersion">1</property>
|
||||
<property name="thingTypeVersion">2</property>
|
||||
</properties>
|
||||
|
||||
<representation-property>uid</representation-property>
|
||||
@ -132,13 +132,13 @@
|
||||
<category>Lightbulb</category>
|
||||
<channels>
|
||||
<channel typeId="system.color" id="color"/>
|
||||
<channel typeId="ct" id="color_temperature"/>
|
||||
<channel typeId="system.color-temperature-abs" id="color_temperature"/>
|
||||
<channel typeId="ontime" id="ontime"/>
|
||||
<channel typeId="alert" id="alert"/>
|
||||
</channels>
|
||||
|
||||
<properties>
|
||||
<property name="thingTypeVersion">1</property>
|
||||
<property name="thingTypeVersion">2</property>
|
||||
</properties>
|
||||
|
||||
<representation-property>uid</representation-property>
|
||||
@ -169,14 +169,6 @@
|
||||
<state pattern="%.1f %%"/>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="ct">
|
||||
<item-type>Number</item-type>
|
||||
<label>Color Temperature</label>
|
||||
<description>Controls the color temperature of the light in Kelvin</description>
|
||||
<category>ColorLight</category>
|
||||
<state pattern="%.0f K" min="1000" max="10000"/>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="ontime">
|
||||
<item-type>Number:Time</item-type>
|
||||
<label>On Time</label>
|
||||
|
@ -33,6 +33,11 @@
|
||||
<type>system:brightness</type>
|
||||
</update-channel>
|
||||
</instruction-set>
|
||||
<instruction-set targetVersion="2">
|
||||
<update-channel id="color_temperature">
|
||||
<type>system:color-temperature-abs</type>
|
||||
</update-channel>
|
||||
</instruction-set>
|
||||
</thing-type>
|
||||
|
||||
<thing-type uid="deconz:dimmablelight">
|
||||
@ -49,6 +54,11 @@
|
||||
<type>system:color</type>
|
||||
</update-channel>
|
||||
</instruction-set>
|
||||
<instruction-set targetVersion="2">
|
||||
<update-channel id="color_temperature">
|
||||
<type>system:color-temperature-abs</type>
|
||||
</update-channel>
|
||||
</instruction-set>
|
||||
</thing-type>
|
||||
|
||||
<thing-type uid="deconz:lightgroup">
|
||||
@ -57,6 +67,11 @@
|
||||
<type>system:color</type>
|
||||
</update-channel>
|
||||
</instruction-set>
|
||||
<instruction-set targetVersion="2">
|
||||
<update-channel id="color_temperature">
|
||||
<type>system:color-temperature-abs</type>
|
||||
</update-channel>
|
||||
</instruction-set>
|
||||
</thing-type>
|
||||
|
||||
<thing-type uid="deconz:onofflight">
|
||||
|
Loading…
Reference in New Issue
Block a user