How to create a light template with white/RGB color modes

Hi. I’ve been learning to create light templates linked to input_boolean and input_number to keep the values after a restart.
For one of my devices, I need to create a light template that supports white and color modes.

In the Home Assistant Light Template Integration page it shows an example with “set_white_value:”, but this was giving errors so I learnt that white_value is not supported anymore and the new method is color_mode.

Does anyone have an (updated) example of how to implement color modes in a template light script?


Also another doubt: I understand that template lights need to have their templates and their turn_on, turn_off, set_color actions at least in order to store the values in variables or helpers, and then restore the values after a system restart.

But let’s say that for another light I don’t need the status restored after a restart, and I just want to use the device to start actions in Node-RED, is it a problem to create template lights with just these empty settings?

        friendly_name: "Test Light Template"

I created this one and was able to use it perfectly from Node-RED, what would be the drawback here?