How to set a HSL color like "(0,0,0)", as a command option?

I want to add command options to a light color item in HSL format like this:

config:
  options: '(0,0,0)=black'

As expected, the commas inside the HSL color are parsed as separators, which produces three command options: “(0”, “0”, “0)=black”.
Escaping the commas like ‘(0\,0\,0)=black’ doesn’t work.
How can I escape the commas?

To escape charcters use the \ symbol (NOT /) try
‘(0\,0\,0)=black’

That’s what I already tried (looks like \'s need to be escaped here, too :smiley:), but it doesn’t work.

I use the following for RGB

output = (r * 255) +","+ (g * 255) +","+ (b * 255)
output = "{\"rgb\":\"" + output + "\"}"; 

so for you maybe

H=0
S=0
L=0
myHSL = H + "," + S + "," + L
output = "options: \'(" + myHSL + ")=black"

and insert that into

config:
  output

I’m not sure of the formatting of you output - is it yaml?

Unfortunately, I don’t think there’s a direct solution for this problem yet. Your best bet is to use a proxy item with simple options and a rule to react to those options by sending the actual commands.

See here: