I have two items linked to the color channel of a LIFX bulb. One is a Switch item and the other a Color item.
Both work correctly, but when I switch the bulb on with the Switch item two seconds later the Color items value is updated, at this moment the switch toggle in the sitemap turns to the “off” position.
19:48:24.510 [INFO ] [smarthome.event.ItemCommandEvent ] - Item 'Entry_Light' received command ON
19:48:24.519 [INFO ] [marthome.event.ItemStateChangedEvent] - Entry_Light changed from OFF to ON
19:48:26.736 [INFO ] [marthome.event.ItemStateChangedEvent] - Entry_Light_Colour changed from 47.659420013427734375,17,0 to 47.659420013427734375,17,38
Could there be a solution to this or do I have to live with only using one item, either a switch or a colorpicker?
Or is there plans to implement a State channel into the binding? As I could see this rectifying the issue.
I assume this is because the binding sends an HSB value and thus the Switch item is set to UNDEF (und hence the toggle shows OFF).
The framework currently does not support items being linked, which are not exactly corresponding to the channel type; I would consider this a bug, so feel free to create an issue at https://github.com/eclipse/smarthome/issues for it.
Thanks for the reply Kai, this is how I understood the problem too.
Lolodomo, I had a feeling this may have been an issue with the Hue binding also, although I do not have any Hue hardware.
Am i understanding correctly that you have a colorpicker and a switch in the sitemap controlling the single color item? I’ll try linking only one item to the color channel and multiple controls in the sitemap. Thanks.
Thanks Lolodomo but your fix didn’t work for me. I had to resort to using a virtual switch item and a rule to relay it’s commands to the switch item linked to the color channel. The problem with this is that the virtual switch state it is not updated if the lamp is turned on via the colorpicker item, or the LIFX app. Not ideal but much better.
rule "Entry Virutal Switch ON"
Item Entry_Light_Virtual_Switch changed to ON
rule "Entry Virutal Switch OFF"
Item Entry_Light_Virtual_Switch changed to OFF