.... setLevel(0) impossible... same with setColor(h,s,v) with a level: 0
I'm likely going to post a few issues with the virtual RGBW driver published by Hubitat (closed source), additional to the post a few days ago which was unanswered.
Let me start with a question - the setLevel command in the UI for this device shows an allowable input range of 0-100 , as expected, but in reality you can't post a value of 0 in this entry box, only 1 or larger. Why ?
The bad side effect of this is that a virtual RGBW does not turn off by posting a level of 0 which is contrary to the default implementation in a standard dimmer, a behavior that I personally dislike, but that's been discussed and dismissed elsewhere. Ineed it will turn on instead. It at least should be consistent within HE.
Net effect - you can't set a colortemperature on a bulb without turning it on - even though the setColorTemperature command supports inclusion of a level eg 0 as the second parameter. It will ignore 0 and turn the bulb ON at level 1. Why is this behavior preferred ?
setColorTemperature( colTemp, 0 ) << turns light on even though brightness level is 0
It's the same gripe I have with level - setting a brightness >0 turns the lamp on. I don't want that behavior - if the lamp is switched OFF then it should remain off is my preference. But I understand there's another expectation on this.
I am trying to create a virtual RGBW that reflects the state of a bulb as reported on MQTT but every time the colortemperature status is reported the bulb turns on. I can't check the color temperature matches the virtual bulbs color temperature as typically this is a rounded value e.g. 5000 rather than 5123 so I will always try and update the HE virtual RGBW device which turns the light on even though I know it's off.
I have moved on from HE being my primary controller for these and other enforced behavior reasons but I am trying to maintain the MQTT application in a way that HE devices can be exposed to MQTT allowing them to be used from other controllers, and the reverse of allowing a remote device being mirrored into HE but aspects like this make it very difficult causing spurious on off with lights that are synchronized.
Why is the code implemented like this and why are virtual (and generic) drivers not published in the HE public repository to allow us to work around this behavior ? These closed source basic drivers are another reason that HE is no longer my preferred controller. I understand that they might become harder to support if modified but they have issues that can't easily be worked around except by proliferating more and more custom drivers which confuses.