Set bulb color temp and level (mostly) not working

I'm busy migrating from a SmartThings V1 hub to HE. Good thing I didn't leave it until the last minute :D.

I have a Simple Automation to turn on and set the level and color temp of a LED light strip. This has been working flawlessly in ST for the last several years. With HE, I almost never get the level set correctly. The light always turns on, but 90% of the time, the level isn't set. Occasionally it does work. Once the light is on, then the level always gets set if I trigger the button again.

Is my automation correct? Is this possible?

Some details:

I am using an Inovelli switch to control three Zigbee LED strips. When I tap up on the switch, the automation must turn the lights on at 100% and when I tap the setup button, it turns on the lights at 30%.

The message is sometimes logged in the device log but not executed by the device. Sometimes I don't see the level message in the device log.

This is the automation:

What drivers are you using for these? If "Generic Zigbee...," the corresponding "Advanced Zigbee..." driver may (or may not) work better, though I generally prefer the latter when possible. With pretty much any driver, this is an issue I've seen with lots of Zigbee bulbs in Hubitat, and a search of posts here will reveal that you are not alone. Re-activating the scene a second or even fraction of a second later (or otherwise just finding some way to resend the desired command) is a common workaround.

In the future, I suspect this may get better, particularly with how Hubitat recently introduced the ability to set color temperature and level with a single command. Until recently, this required two..separate commands on Hubitat. The change is so recent that I don't think any apps use the new command yet (at least built-in ones), but I'm guessing that should change going forward as more drivers get updated and app authors can depend on this behavior. My theory is that the bulbs (or perhaps the entire network) are getting commands too fast, and slowing things down or re-sending avoids or works around this problem. A single Hubitat command may help with many devices (though not so much if it still ends up being two Zigbee messages, but at least the driver would know and have more control over timing).

1 Like

Thanks for the reply! I'll check the driver.

Your reply is more or less what I suspected. If nothing else works, I'll try a RuleMachine rule and do it in two separate actions. I tend to try the simplest approach first and only complicate matters if need be.

I deleted the Simple Automations and added Rule Machine rules. Rule Machine seems much more reliable, although still not quite 100%. But I can live with it for now. I didn't add two actions - just one (set color temp & level).

I do hope things get updated as you mentioned, to use a single command to set both temp/color and level. That definitely seems like a good solution.

Right; what I meant is that this requires two commands under the hood. (Rule Machine gives you a human-friendly-ish interface that mostly just runs commands on devices, but it's not always a 1-to-1 mapping.) Until recently, the "Set Color Temperature" command was standardized as a command that took one parameter, color temperature. If you wanted to set a different level, you'd need a second command. This changed recently, but many drivers are still catching up, and until that happens, most apps--including Rule Machine--probably won't try using it.

But since you are using RM, you can break this apart into two separate actions yourself: a "set color temperature" (with no level) and a "set dimmer" (this calls setLevel()) action, probably with a small delay in between. If your bulb driver supports it, you could also call the new/three-parameter setColorTemperature() command yourself via the "custom action" option to see if that is any different.

Yes - that's what I meant in the first reply - I was planning to use two actions, but then it turned out that only one action in RM seems much more reliable than the action in the Simple Automation. If I keep on having issues, I will split it into two actions.

From the logs, it looks like RM executes the actions with slightly different timing than SA did, but as long as it works I'm not going to dig into it much further. I have a bunch of other stuff to bring over :smile:

2 Likes