HomeAssistantError: extra keys not allowed @ data['return_response']. Got False

I can find several posts with the “extra keys not allowed” message, but mostly the key they refer to is actually something people use in the data field. In my case, this seems to refer to something that I find documented here

But I cannot figure out why all my node red service calls trigger this error. As you can see from the screenshot, I only put temperature in the data field, so I assume the return_response comes from the palette code (the home assistant contrib websocket lib).

Appreciate any pointers that can lead me to figure out why this is happening.

There is a post on here somewhere warning not to update to the latest websocket contrib. This might be why? Let me see if I can find the post.

Have you, by chance, updated your HA WebSocket nodes to v0.60.0+ ?

Home Assistant service calls have always been ‘fire and forget’ with absolutely no response returned. This has recently (HA 2023.7) changed to include a return response.

This change has generated significant modifications to the way HA (and integrations) deal with service calls, and the onward effect of this is now being seen in the Home Assistant WebSocket nodes. If I understand this stuff correctly, the ‘call service’ node has to change to deal with a (possible/requested/required) return response from HA.

Clearly there are versions of HA, of the WebSocket nodes, and of the Node-RED companion that do not, and subsequently do, provide and/or manage the return response. At this current time, I would suggest that great care needs to be taken to ensure that all installed component parts are cross-compatible.

The Node-RED addon for HA comes with a stable version of Node-RED and of the WebSocket nodes.

At the time of writing, HA WebSocket contrib node set version 0.59.0 is the last one that (I believe) works with the current version of the Node-RED addon.

Going to v0.60.0 and beyond requires HA 2023.12+
This is a call service breaking change
(note - there is a version check with error message around this, but only from v0.62.2)

Going to v0.61.0 and beyond requires Node-RED v3.1.1+
This is a Node-RED version breaking change

Node-RED contrib home asssitant WebSocket nodes > Release History!

Personally I am sitting tight until the next update release of the Node-RED addon, which should include the latest Node-RED and the latest HA WebSocket nodes as a proven and working set.

Thank you for a thorough response. I’m using container installs and right now I am on HA 2023.12.1, and NodeRED 3.1.3 with websockets 0.6.1.

Based on your list it seems I should have been ok using 0.6.1 with HA 2023.12.1, but I guess the safest thing to do is to try downgrading. I’ll start with websockets and work my way from there.

Downgrading to websockets 0.59.0 did the trick. Not sure why my earlier combination didn’t work, but don’t overly care either now that my flows are working again. Thank you for helping out.

1 Like

It seems that a websocket 0.62.2 is available (saw this today only).
I had the same issue, but then making the upgrades with the combo: HA 2023.12.3 - NodeRED 3.1.3 and websocket 0.62.2 fixed it for me.
Thank you for pointing toward this direction.