Node Red Not Setting Hue Color and Level

I have a somewhat complex Node designed to change light colors based upon the weather. However, this part of the Flow does not work.

[{"id":"860865f96e8202f3","type":"api-call-service","z":"8f8f28dccb36133e","name":"Staircase Light","server":"8efa78ba.f10338","version":3,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.staircase_light_strip","data":"{\"color_name\":\"{msg.color}\",\"brightness\":100}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":580,"y":140,"wires":[["421256a1b85e3a80"]]},{"id":"8efa78ba.f10338","type":"server","name":"Home Assistant","version":1,"legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

The logs seem correct:

11/7/2021, 8:06:02 AMnode: 421256a1b85e3a80
msg : Object
object
_msgid: "622484dbbc7cbaac"
payload: 1636290362309
topic: ""
color: "red"

But the actual light does not turn red (or adjust brightness).

Any ideas?

you set β€œ{msg.color}” instead of β€œ{{msg.color}}”

1 Like

Figured it out. {β€œmessage”: color} as JSONATA.

Your way also worked.