Tasmota Light not working with Color Temperature

I have a Tasmota bathroom light fitting.
I control the brightness and colour with butons.
With the old rule machine legacy button controller I had the abilty to change the color of the leds using set temperature.
This abilty seeems to be not working in the new button controller app.
The color of the LEDs does not change at all.
Only seems to affect the Tasmota light. Other lights (bulbs) change using temperature with no problem at all.
I do get a groovy error in the log so maybe something was changed to cause this?
If so, is it possible to get this working again?

This looks like a custom driver. You will need to ask the author of this driver (or someone else, or do it yourself) to update the driver to reflect changes Hubitat introduced in platform version 2.2.6 and has started depending on in some built-in apps, like Rule Machine and Button Controller, in the couple versions after that.

Some information for the developer (or you should you take this on yourself): the setColorTemperature() command previously took only one parameter, the desired color temperature. Now it can take up to three, though all besides the first are optional: color temperature, level, and transition time. The docs have been updated to reflect this: Driver Capability List - Hubitat Documentation.

In the meantime, you can work around this problem in Rule Machine or Button Controller yourself if you want. Instead of using the built-in Set Dimmers and Bulbs > Set Color Temperature and Level action, use a custom command, under Set Mode or Variables, Run Custom Action > Run Custom Action. Choose a capability your device has so you can select it (anything is fine; Dimmer is a logical choice), then choose the setColorTemperature() command and provide one parameter of type "number" with your desired color temperature (appears to be 5000 from your log entry). Then, set the level. You don't need a custom command for that; the built-in Set Dimmers and Bulbs > Set dimmer level action will still work. You may need to put a small delay between these commands if your device doesn't seem to like them getting sent too fast in a row. A bit of a hassle, but something you can do without modifying the driver.

Yes, it is a Marcus one.
I am not able to have any stress atm so will put on hold me learning groovy for now :slight_smile:
I will look at the custom action. Thanks.

Got the same error with the custom action :frowning:
Might just make this a dumb light until I can see about reading up on groovy.

Can you show a screenshot of the custom action in the Rule? You shouldn't get that error if you only provide one parameter. A screenshot of the error may also be helpful.

Markus isn't on the forum anymore, so you might be on your own for this driver. There may be other community options, though someone else (maybe me, ha) might be able to look at yours if you provide a link.

Thanks but I deleted the custom action now. Sure I had it setup correctly though.
I have set the light to the preferred color, outside of Hubitat.
I have removed all color options for the light on the button controller.
I have set the button controller to just dim and turn off the light now.
The other colors were rarely used on this light so its a small loss.
Going forward I will look for a better supported device to replace the Tasmota one.
Thanks again for you help :slight_smile:

1 Like

After some reading, head scratching and experimentation I believe Iā€™ve now solved the problemā€¦.
The error message in the log saying ā€˜No Signature of Method etc etcā€™ seems to be saying that the routine setColorTemperature in the Tasmota Universal Parent driver is being called from the Child driver (Generic Component RGBW) with 4 arguments, whereas the definition of the routine only deals with 2 arguments i.e. com.hubitat.app.DeviceWrapper cd and BigDecimal colortemperature. The two other arguments are ā€˜levelā€™ and ā€˜transition timeā€™.

I added the 2 additional arguments into the routine definition at line 1536 of the parent driver, and also added in the line to call tasmota_rgbw_setLevel, so the code in the driver now looks like this:

void componentSetColorTemperature(com.hubitat.app.DeviceWrapper cd, BigDecimal colortemperature, BigDecimal level, BigDecimal Unused_ttime) {
String actionType = getDeviceActionType(cd.deviceNetworkId)
logging("componentSetColorTemperature(cd=${cd.displayName} (${cd.deviceNetworkId}), colortemperature=${colortemperature}, level=${level}) actionType=$actionType", 1)
tasmota_rgbw_setColorTemperature(colortemperature)
tasmota_rgbw_setLevel(level)
}

As far as I can tell, the ā€˜transition timeā€™ is not used, so Iā€™ve left that out of any modifications.

So, this all seems to be working again for me.

1 Like

Great work. Tested and can confirm it works for me too. Cheers :slight_smile: