Per the Rules API documentation, there is a field called commandId in commandAction->commands which returns a BodyMalformed error as it seems to not be recognized.
See example JSON:
{
"name": "Control Dining Room Switches",
"actions": [
{
"if": {
"equals": {
"left": {
"device": {
"devices": [
"a6fed7df-4497-41de-b197-bfe6b2c78e28"
],
"component": "main",
"capability": "switch",
"attribute": "switch",
"trigger": "Always"
}
},
"right": {
"string": "off"
}
},
"then": [
{
"command": {
"devices": [
"6c092e48-d616-423b-a621-ee951f8acab1"
],
"commands": [
{
"component": "main",
"capability": "switch",
"command": "off",
"commandId": "run by rule"
}
]
}
}
]
}
}
]
}
@nayelyz
Thanks
Henry