@nayelyz
I tried again with only one every and using a virtual device to start the rule. Here is my rule body:
{
"name":"Loop test",
"actions":[
{
"if": {
"equals": {
"left": {
"device": {
"devices": [
"850ad9f9-2daf-400a-94d9-5e9ce4f72496"
],
"component": "main",
"capability": "switch",
"attribute": "switch"
}
},
"right": {
"string": "on"
}
},
"then": [
{
"if": {
"equals": {
"left": {
"device": {
"devices": [
"c6860ae0-3d96-40bb-a260-9b4f2d770ebe"
],
"component": "main",
"capability": "switch",
"attribute": "switch"
}
},
"right": {
"string": "off"
}
},
"then": [
{
"every":{
"interval":{
"value":{
"integer":5
},
"unit":"Minute"
},
"actions":[
{
"if":{
"equals":{
"right":{
"device":{
"devices":[
"a69158f0-2e5d-46ca-829b-01ecafc04c55", "a69158f0-2e5d-46ca-829b-01ecafc04c55", "4ffbf90f-8760-4dcc-a471-c5dba2a8d028", "6f81a548-ab24-4c25-9819-df8ba6cfe38e", "e42886db-3662-4d76-a060-6f787253b186", "3460b018-745f-4e02-9506-911b76947a90", "2b9b9281-651d-4cb8-980b-19081c29f0e4", "62127998-5401-445b-b305-e2b9efd4c9e9"
],
"component":"main",
"capability":"switch",
"attribute":"switch"
}
},
"left":{
"string":"off"
},
"aggregation":"All"
},
"then":[
{
"limit":{
"count":1,
"period":"Lifetime",
"actions":[
{
"command":{
"devices":[
"c6860ae0-3d96-40bb-a260-9b4f2d770ebe"
],
"commands":[
{
"component":"main",
"capability":"switch",
"command":"off"
}
]
}
}
],
"sequence":{
"actions":"Parallel"
}
}
}
]
}
},
{
"command":{
"devices":[
"1300ba52-1497-48b4-99af-c35e69dab22d"
],
"commands":[
{
"component":"main",
"capability":"switch",
"command":"on"
}
]
}
}
]
}
}
]
}
}
]
}
}]
}
Unfortunately, I still get the same null error:
{
"requestId": "948DDF0C-BB3D-4B9F-9491-F6E620B5F8AE",
"error": {
"code": "ConstraintViolationError",
"message": "The request is malformed.",
"details": [
{
"code": "NullError",
"target": "every",
"message": "every must be null.",
"details": []
}
]
}
}
Any idea what this null error is pointing to? Does the every have to be at the top level?
thanks!