Bump on a old post, I ran into this exact issue with dynamic Spotify device id’s.
Luckily HA recognizes device names as well, please see below
service: spotcast.start
data:
device_name: Echo Show
uri: spotify:playlist:37i9dQZF1E36xhmfSuyjJz
random_song: true
Below is my node red flow selecting which device using a input selection helper
[{"id":"73f724c46d293274","type":"server-state-changed","z":"e23ef64855980fae","name":"Devices","server":"91b2c05b.a0cf7","version":5,"outputs":1,"exposeAsEntityConfig":"","entityId":"input_select.devices","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":70,"y":140,"wires":[["8b4a4426ce061a3e"]]},{"id":"8b4a4426ce061a3e","type":"switch","z":"e23ef64855980fae","name":"Options Payload","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"Everywhere","vt":"str"},{"t":"eq","v":"Bedroom","vt":"str"},{"t":"eq","v":"Echo Show","vt":"str"},{"t":"eq","v":"Indoors","vt":"str"},{"t":"eq","v":"Music Echo","vt":"str"},{"t":"eq","v":"Office Echo","vt":"str"}],"checkall":"true","repair":false,"outputs":6,"x":260,"y":140,"wires":[["f931cfe898cab778"],["f9e93f08e7bff401"],["251cf3e5cc24138f"],["d99c3ae73f6a23f4"],["30b7b9eebf2eb052"],["8e547ad0c463b398"]]},{"id":"f931cfe898cab778","type":"api-call-service","z":"e23ef64855980fae","name":"Everywhere","server":"91b2c05b.a0cf7","version":5,"debugenabled":false,"domain":"spotcast","service":"start","areaId":[],"deviceId":[],"entityId":["media_player.spotify_johnathan_norman"],"data":"{\t \"device_name\":\"Everywhere\",\t \"random_song\":true\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":450,"y":20,"wires":[[]]},{"id":"f9e93f08e7bff401","type":"api-call-service","z":"e23ef64855980fae","name":"Bedroom","server":"91b2c05b.a0cf7","version":5,"debugenabled":false,"domain":"spotcast","service":"start","areaId":[],"deviceId":[],"entityId":["media_player.everywhere"],"data":"{\t \"device_name\": \"Bedroom Echo\",\t \"random_song\":true \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":460,"y":80,"wires":[[]]},{"id":"251cf3e5cc24138f","type":"api-call-service","z":"e23ef64855980fae","name":"Echo Show","server":"91b2c05b.a0cf7","version":5,"debugenabled":false,"domain":"spotcast","service":"start","areaId":[],"deviceId":[],"entityId":["media_player.everywhere"],"data":"{\t \"device_name\": \"Echo Show\",\t \"random_song\":true \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":470,"y":140,"wires":[[]]},{"id":"d99c3ae73f6a23f4","type":"api-call-service","z":"e23ef64855980fae","name":"Indoors","server":"91b2c05b.a0cf7","version":5,"debugenabled":false,"domain":"spotcast","service":"start","areaId":[],"deviceId":[],"entityId":["media_player.everywhere"],"data":"{\t \"device_name\": \"Indoors\",\t \"random_song\":true \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":480,"y":200,"wires":[[]]},{"id":"30b7b9eebf2eb052","type":"api-call-service","z":"e23ef64855980fae","name":"Music Echo","server":"91b2c05b.a0cf7","version":5,"debugenabled":false,"domain":"spotcast","service":"start","areaId":[],"deviceId":[],"entityId":["media_player.everywhere"],"data":"{\t \"device_name\": \"Music_Echo\",\t \"random_song\":true \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":470,"y":260,"wires":[[]]},{"id":"8e547ad0c463b398","type":"api-call-service","z":"e23ef64855980fae","name":"Office Echo","server":"91b2c05b.a0cf7","version":5,"debugenabled":false,"domain":"spotcast","service":"start","areaId":[],"deviceId":[],"entityId":["media_player.everywhere"],"data":"{\t \"device_name\": \"Office Echo\",\t \"random_song\":true \t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":410,"y":320,"wires":[[]]},{"id":"91b2c05b.a0cf7","type":"server","name":"Home Assistant","addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"","connectionDelay":false,"cacheJson":false,"heartbeat":false,"heartbeatInterval":"","statusSeparator":"","enableGlobalContextStore":false}]