I tried all methods but still failed. I pray to god, hopefully, someone knows a solution to this.
I get the error “422 The request is malformed. name: Unrecognized field “name” (class v20190122.internal.st.behaviors.Action), not marked as ignorable”
I want to check if it is ON every 1 hour and if it OFF then turn it ON. Even if it is not possible every 1 hour, then execute the same logic in the previous statement.
{
"name": "Check and enable rapid cooling and freezing.",
"actions": [
{
"if": {
"and": [
{
"equals": {
"left": {
"device": {
"devices": [
"xxxxxx"
],
"component": "main",
"capability": "refrigeration",
"attribute": "rapidCooling"
}
},
"right": {
"boolean": false
}
}
},
{
"equals": {
"left": {
"device": {
"devices": [
"xxxxx"
],
"component": "main",
"capability": "refrigeration",
"attribute": "rapidFreezing"
}
},
"right": {
"boolean": false
}
}
}
]
},
"then": [
{
"command": {
"devices": [
"xxxxx"
],
"commands": [
{
"component": "main",
"capability": "refrigeration",
"command": "setRapidCooling",
"arguments": [true]
}
]
}
},
{
"command": {
"devices": [
"xxxxxx"
],
"commands": [
{
"component": "main",
"capability": "refrigeration",
"command": "setRapidFreezing",
"arguments": [true]
}
]
}
}
],
"else": []
}
]
}