node-red-contrib-sonos-plus
node-red-contrib-sonos-plus copied to clipboard
Trying to escape an apostrophe
Description
I think I'm having an escaping problem.
What node/command (topic)/state (payload)
I feed a message to a get node with just the Player name
{"event_type":"zha_event",
"_msgid":"5e589f9d4abb5bc2",
"_event":"node:ddb82b72a11a8932",
"playerName":"Charley's Room"}
I get an error:
group.get.state: could not find given player in any group :: Details: none
node: Universal command: group.get.state
I've tried it a couple ways
// Play/Pause
if (msg.payload.event.command == "toggle") {
delete msg.payload;
delete msg.topic;
msg.playerName = 'Charley\'s Room'
return [null,msg];
}
// Play/Pause
if (msg.payload.event.command == "toggle") {
delete msg.payload;
delete msg.topic;
msg.playerName = "Charley's Room"
return [null,msg];
}
In case of a bug: Are you able to reproduce the error
yes
Versions and Infrastructure
what system: Home assistant addon node-red-contrib-sonos-plus version: 6.9.0 Node-RED version: Current version: 18.0.2 NodeJS version: maybe v18.20.3
see: [https://flows.nodered.org/flow/a5c42641bf33dd0da9bfd4426a06950a]