Create scenes no longer working I get API error

As the title says I get an API error, these worked perfectly well until recently so im guessing something was updated in a recent update but is it a bug or do i now need to do something else to create a scene?
We use this to remind us its time for our son to take his meds, he’s autistic so its good to keep to a routine but the light colour change helps him as much as it helps us.

The error is Call-service error. extra keys not allowed @ data[‘entity_id’]

[{"id":"ebd09dbd7facc040","type":"tab","label":"Flow 1","disabled":false,"info":"","env":[]},{"id":"c8f73d578676190f","type":"inject","z":"ebd09dbd7facc040","name":"Alex Meds","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"05 19 * * *","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":230,"y":200,"wires":[["625e414b719e55e1"]]},{"id":"3997f77ac260efa4","type":"delay","z":"ebd09dbd7facc040","name":"","pauseType":"delay","timeout":"30","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":1040,"y":200,"wires":[["02bbdd552904ac67"]]},{"id":"415e8da91f82c23e","type":"api-call-service","z":"ebd09dbd7facc040","name":"Lights Yellow","server":"e7f76522.c1a328","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.lamp","light.diningroom_innr","light.big_light"],"data":"{\"color_name\":\"yellow\", \"brightness_pct\": 100}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":850,"y":200,"wires":[["3997f77ac260efa4"]]},{"id":"02bbdd552904ac67","type":"api-call-service","z":"ebd09dbd7facc040","name":"Return lights to previous","server":"e7f76522.c1a328","version":5,"debugenabled":false,"domain":"scene","service":"turn_on","areaId":[],"deviceId":[],"entityId":["scene.alexnight_meds"],"data":"","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1270,"y":200,"wires":[[]]},{"id":"625e414b719e55e1","type":"api-call-service","z":"ebd09dbd7facc040","name":"Flash Lights","server":"e7f76522.c1a328","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["group.living_room_lights","light.diningroom_innr"],"data":"{\"flash\":\"short\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":430,"y":200,"wires":[["b4d00eba81cf3c8e"]]},{"id":"b4d00eba81cf3c8e","type":"api-call-service","z":"ebd09dbd7facc040","name":"Create Scene","server":"e7f76522.c1a328","version":5,"debugenabled":false,"domain":"scene","service":"create","areaId":[],"deviceId":[],"entityId":["scene.alexnight_meds"],"data":"{\"scene_id\":\"alexnight_meds\",\"snapshot_entities\":[\"light.lamp\",\"light.diningroom_innr\",\"light.big_light\"]}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":620,"y":200,"wires":[["415e8da91f82c23e"]]},{"id":"e7f76522.c1a328","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":false,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30"}]

I don’t see entity_id defined in that node. Try delete the node. deploy, then grab a new call service node and set it up again.

But it worked fine until recently the entities for the snapshot are defined and its that that is giving the api error. Nothing has changed since it working and now not working. If I delete it and set it up again i would be setting it up exactly as I have it set up now.

A call service node for creation of scene doesnt ask for entity id ?

edit weirdly that worked thanks for the advice

Call service in node red will almost always follow the HA automation. If you look at the docs for creating scenes on the fly, it shows no entity ID.

It isn’t really an entity in the normal sense because it is deleted once it has been loaded. Created scenes do not persist nor survive restarts.

As for the weird behavior there has been changes to nodered regarding entities. I’ve had HA nodes hold old settings before. It’s like some of the individual nodes don’t update to the newest versions and throw errors. Deleting and recreating ensures the newest version of the node is loaded.

Again thank you for your help keeping the little one on a routine is really important to his well being.
Really appreciate the help and the info.

Have another very similar routine that I thought was fixed by doing as suggested but that one simply wont work ive deleted and tried again and get the same api error. Very strange especially since like the above it used to work fine. Ive created it as an automation in HA rather than node red as I cant seem to fix it.

ok so it turns out it didnt fix it as the automation again gives the API error. This must be a bug in a recent update as it worked perfect until now.
I don’t understand how it worked by replacing the call service node and re doing it but now its giving the same error again.
I can get around it by creating the automation outside of node red but I much prefer the node red way of doing things.

edit Again ive deleted and redone it and then it worked no api error nothing is different…

This is odd, could you try using a timestamp straight to the create scene. I have them in my flows and so far they seem to all work as expected. The only other thing I can think of right now is to change the name of the scene.

image

It is odd but for the moment its working again so ive deleted them 3 times now haha and so far 3rd time lucky

1 Like