I was just playing around with a "Generic Component RGBW" device (as a child device of a parent device I'm writing) and noticed an oddity:
- Expected behavior: calling
setColorTemperature(temp, level, rate)
on child device should callcomponentSetColorTemperature(childDev. temp. level, rate)
on parent (or perhaps some variation thereof, depending on value of optional parameters) - Observed behavior: calling
setColorTemperature(temp, level, rate)
on child device callscomponentSetLevel(childDev, level, rate)
andcomponentSetColorTemperature(childDev, temp, null, null)
on parent
I can understand the reasoning here, at least historically: the three-parameter setColorTemperature()
command was new in 2.2.6, so this risked breaking fewer parent drivers/apps. However, since 2.2.8 began using the "new" command in many built-in apps and (I think?) all built-in drivers caught up and many built-in apps have begun depending on these commands, forcing many community drivers to catch up, this is likely less of a concern.
However, there is no way to force the "new" behavior, so would it be possible to either get an option to prefer this behavior instead--or just make it the normal behavior for this driver now that the "new" command implementation is more widespread? I'm running into a problem with either a device or perhaps just its API that doesn't work as expected if these two commands are sent at nearly the same time, as the current behavior causes (something I may need to look into anyway, but a change like this would help avoid the issue in the first place and should be useful for lots of other devices that also support this action as a single "command").
On a related note, I also still observed the logging issue mentioned here, which as far as I can tell must just be a typo in the log lines since the actual commands receive the values as expected: [BUG] componentSetEffect passes null in Generic Component RGBW Light Effects - #4 by gslender