|  Developer

and

  • The AND logic operator is when block. This condition is in case when all conditions in blocks array are also. The AND operation could contain a different when blocks except some restrictions are described below. The AND operator could contain a nested logic operators.
Edit
Field Type Required Description
blockOptions.method.args.blocks string + The argument declaration of field. The name is “blocks”. The type is “blocks”. The field could contain several when blocks. If all contained blocks are then this block is also otherwise it is .
Edit
hub.scenes.edit and hub.scenes.create commands should check conflicts in conditions and send error in answer if conflict was detected:
Type of conflict Error message Error data
Have more then one isItemState block for same item Scene contain conditions for same functionality inside of AND condition
Have more then one isButtonState block for same item Scene contain conditions for same functionality inside of AND condition
Have more then one compareNumbers block for same item and all of that have not intersect ranges Scene contain conditions for not intersect numbers values inside of AND condition
Edit
				
					{
   "blockType":"when",
   "blockOptions":{
      "method":{
         "name":"and",
         "args":{
            "blocks":"blocks"
         }
      }
   },
   "fields":[
      {
         "name":"blocks",
         "type":"blocks",
         "value": [
           {
               __WHEN_BLOCK__
           },
           {
               __WHEN_BLOCK__
           },
           {
               "blockType":"when",
               "blockOptions":{
                  "method":{
                     "name":"and",
                     "args":{
                        "blocks":"blocks"
                     }
                  }
               },
               "fields":[
                  {
                     "name":"blocks",
                     "type":"blocks",
                     "value": [
                       {
                           __WHEN_BLOCK__
                       },
                       {
                           __WHEN_BLOCK__
                       }
                     ]
                  }
               ]
            }
         ]
      }
   ]
}