I’m having trouble configuring a Node Red Call Service Node that will join four Sonos speakers together. I believe I’ve configured the HA “Call Service Node” correctly - followed the example included within the node. Each time the node is triggered an error is received. My data field, based on the sample, reads as follows;
{"group_members":"- media_player.kitchen_sonos\n- media_player.breakfast_sonos\n- Media_player.livingroom_sonos\n- media_player.workshop_sonos\n"}
This format didn’t look right to me so I tried;
{
"group_members": [
"- media_player.kitchen_sonos\n",
"- media_player.breakfast_sonos\n",
"- Media_player.livingroom_sonos\n",
"- media_player.workshop_sonos\n"
]
}
and;
{
"group_members": [
"- media_player.kitchen_sonos",
"- media_player.breakfast_sonos",
"- Media_player.livingroom_sonos",
"- media_player.workshop_sonos"
]
}
No matter what I try, the following error appears;
HomeAssistantError: Entity ID - media_player.kitchen_sonos
- media_player.breakfast_sonos
- Media_player.livingroom_sonos
- media_player.workshop_sonos
is an invalid entity ID @ data[‘group_members’][0]
I looked at how a “call service” node is configured in an HA script. What I noticed is an Entity is identified. I tried making the “media_player.kitchen_sonos” an “Entity” in the Call Service Node. The configuration I’m working with is;
[{"id":"aefbfef0f6a6119e","type":"inject","z":"768d812a6012a3ed","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":120,"y":1200,"wires":[["9138ad175830307b","859147d757527b5c"]]},{"id":"859147d757527b5c","type":"api-call-service","z":"768d812a6012a3ed","name":"Group Sonos Speakers","server":"fcf9b76b.256a88","version":5,"debugenabled":true,"domain":"media_player","service":"join","areaId":[],"deviceId":[],"entityId":["media_player.kitchen_sonos"],"data":"{\"group_members\":\"- media_player.breakfast_sonos\\n- Media_player.livingroom_sonos\\n- media_player.workshop_sonos\\n\"}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":930,"y":1200,"wires":[["5c91f7d0266ea9e5"]]},{"id":"fcf9b76b.256a88","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true}]
Any assistance you could offer would be greatly appreciated.