Vacuum component send_command not working with parameters

Hey there,

I was trying out the “sed_command” command for my xiaomi roborock. When I try to call the service, e.g.

{
  "entity_id": "vacuum.mozart",
"command": "set_dnd_timer",
"params": [22,0,6,0]
}

I’ll get the error “Invalid service data for vacuum.send_command: expected Dict for dictionary value @ data[‘params’]. Got [22, 0, 6, 0]”.
I already tried adding “” before and after the [], but it still wouldn’t work. And I have no idea why it wants a dictionary value here…

ciB

So, the documentation/example has been changed. The parameters need a dictionary: “params”: {“key”: “value”}
Unfortunately I still don’t know how to get the above example to work, since I do not know what the keys are or how I can figure them out. Not only for this command, but for the other ones also.

All the examples that I could find are for other implementations, e.g openHab or iobroker that don’t use any dictionaries: XiaomiRobot Vacuum Protocol

Can someone help?

(Answering on phone, and my keyboard is lacking the code-apostrophe)

You gave a list, ie “[ … ]”, while it wants a dictionary, ie “{ pizza : good, hamburger : bad }”.

Yeah, it’s been fixed already (currently beta). It now accepts lists and dictionaries. Thanks :slight_smile: