How to setup deconz!

this binding is strange…

if you turn the brightness of a “colortemperaturelight” into a Switch item, you can actually turn the light on and off.
it even recovers the brightness correctly when turning it back on.

the binding will throw an exception saying ON and OFF are illegal values tho and will disconnect from deconz for a couple of seconds.

well… people advise using the hue binding for controlling lights but using the deconz binding totally works except for the fact there is no “on/off” switches for lights other than “onofflight”

i really wonder why https://www.openhab.org/addons/bindings/deconz/ doesn’t provide a Switch item for lights.
this is literally the only feature i’m missing in this binding.

edit:

hmm…

nevermind…

this works just fine to turn lights on and off:

curl -X POST --header "Content-Type: text/plain" --header "Accept: application/json" -d "ON" "https://openhab.home.gottz.de/rest/items/Livingroom_Floodlight_brightness"
curl -X POST --header "Content-Type: text/plain" --header "Accept: application/json" -d "OFF" "https://openhab.home.gottz.de/rest/items/Livingroom_Floodlight_brightness"

now how do i create an item for that…

edit 2:
in the things file i just had to add a channel like this:

Thing colortemperaturelight livingroom-floodlight "Deckenfluter"     @ "Wohnzimmer"   [ id="1" ] {
	Channels:
		Type switch : switch [ channel="brightness" ]
}

image

Switch   Livingroom_Floodlight            "Schaltung"               <switch>       { channel="deconz:colortemperaturelight:zigbee:livingroom-floodlight:switch" }
Dimmer   Livingroom_Floodlight_brightness "Helligkeit"              <light>        { channel="deconz:colortemperaturelight:zigbee:livingroom-floodlight:brightness" }
Number   Livingroom_Floodlight_coltemp    "Farbtemperatur"          <light>        { channel="deconz:colortemperaturelight:zigbee:livingroom-floodlight:color_temperature" }