[Deconz] Switch and Dimmer for colortemperaturelight

May someone help me with configuration files to get a colortemperaturelight represented by a on/off switch and a dimmer for brightness?
Defining a colortemperaturelight thing does not give the option to add a ‘switch’ channel on it. There is just a color_temperature

My solution (I worked on multi evenings) was to configure more than one thing traced to the same id but with diefferent thing types:

Bridge deconz:deconz:conbee [ host="localhost", apikey="myKey" ] {
 extendedcolorlight LampeSchrank "Lampe Wohnzimmerschrank" [ id = "3" ] 
 dimmablelight LampeSchrankDimmer "Lamp Wohnzimmerschrank Dimmer" [id = "3" ]
 onofflight LampeSchrankSwitch "Lampe Wohnzimmerschrank Switch" [id = "3" ]

Based on these things the items was defined:

Switch swHueLampWohni "Stehlampe Wohnzimmer" <light> {alexa="Switchable", ga="Light", channel="deconz:onofflight:conbee:LampeSchrankSwitch:switch"}
Dimmer swHueLampWohniDimmer "Stehlampe Wohni Dimmer" { channel="deconz:dimmablelight:conbee:LampeSchrankDimmer:brightness"}
Number swHueLampWohniColorTemp "Stehlampe Wohni Temperatur" <light> { channel="deconz:extendedcolorlight:conbee:LampeSchrank:color_temperature"}

This works in terms of controlling these properties of that thing. BUT: Only one property gets updated when it gets set by another controler like the phoscon WebApp.

Thanks so much in advance. I already got kinda frustrated.

For what purpose?
When linked to a Color type Item, the Item accepts on/off and dimmer commands. The Item’s state can be had as on/off or dimmer values in rules. A Color Item can be presented in sitemaps using a Switch or Slider widget.

A Color Item can received ON/OFF as a command (i.e. work as a Switch) or a single PrecentType as a command (i.e. work as a Dimmer.

So all you need is the Color Channel and the Color Item. Then you can use it as any of the three in your Rules or your sitemap.

In rules

    // Switch
    if(MyColorItem.getStateAs(OnOffType) == ON)

    // Dimmer
    if(MyColorItem.getStateAs(PercentType) > 50)

On the sitemap

    Switch item=MyColorItem
    Slider item=MyColorItem
    Color item=MyColorItem

Thank you very much @rossko57 and @rlkoshak!
My sitemap throws an error, using Color. Instead I used Colorpicker. But this didn’t change situation.
It is possible to control brightness (including on/off via a switch item) but there is no chance to control temperature of the hue bulb via deconz binding.
Using this setting (I already restartet binding and after that openhab instance) switch and brightness don’t get updated, when set via web interface.
After all that trouble I wonder if that might be a bug within the deconz binding. Starting a bug item on github might be a good idea?

Color temperature is represented by a separate Channel which you would link to a Dimmer Item and control with a Slider on the sitemap. If the binding only offers a Color channel than it doesn’t support independently controlling the color temp.

I don’t think it would be a bug but it might not be implemented or it might not be possible to implement.

Thank you, @rlkoshak for your feedback. I already started a github ticket. If it is not a bug, it will be closed.
Although we couldn’t solve my problem within this thread, I learned some new things. Thank you for that!
Should I mark this thread as finished or something similar?

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.