Hi
may someone can help me to solve following problem:
This is the data field i m sending to the light. {“brightness_pct”:40,“color_temp”:480}
now i created a boolean in ha to have a slider to change the color_temp. I tried several things (with function and also change nodes) but nothing worked for me.
The plan is to have a node state_changed (boolean slider in HA) soon i change this it should change the variable witch i use instead of the static 480.
i don t understand how the variables working in node red.
i tried following:
state_changed: input_number.lichtfarbe_nacht (ha slider)
.
.
function:
global.set(“lichtfarbe_nacht”,msg.payload);
return msg;
then call status with data:
{“brightness_pct”:100,“color_temp”:"{{lichtfarbe_nacht}}"}
but i get always following error message
“Call-service API error. Error Message: expected int for dictionary value @ data[‘color_temp’]”
i gone through some other posts but can t find a solution for me.
Many thanks
br
Martin