I have an i-shinfu tuya g9 bulb that I am having issues with,
In Node Red, I am attempting to change the color temperature using the jsondata “kelvin” attribute. I have successfully changed the brightness_pct in a previous node but keep getting a “HomeAssistantError: network error:(SYSTEM_ERROR) Server Error” for the kelvin change.
I can see in Tuya IOT platform debug device that using the Smart Home app does change the color temp attribute:
I have tried “color_temp_kelvin” but that did not change anything. Regardless of the actual Light integration names, the light turn_on service in the call service node is still expecting this to be entered as “kelvin” (see Property list).
the specific Tuya light is not making the Color Temp dpid available to Home Assistant.
the underlying code in the Call Service node is still using “kelvin” as the name of the attribute mapped in the Light integration. Seems unlikely as such an oversight would be affecting thousands.
I used a script in visual editor mode to set the color temp to the lowest value. In the yaml, this was set to 2000. So, it was all about units. Position 0 in color_temp is 2000 and position 100 is 6500. So I made the mistake of using the color_temp percentages instead of what these related to in Kelvin. When I changed the value in nodered to anything between 2000 and 6500, it worked fine.
My fault for not realising I needed to convert the value.
The only thing the data section expects is valid json. You can put whatever you want in there as long as it is formatted correctly it will deploy. When it is executed, you will get an error. That error is HA saying I don’t understand what you sent me, it’s not generated by NR.
Kelvin may work for now but at some point it will not. So if you want to leave it as kelvin keep in mind that it’s changed. color_temp_kelvin does work now, at least for me but I have a newer set of nodes. The example has not been changed in the newer version.