compareNumbers
- This event arises when the of item is corresponded to condition is set in this block. For example, if the is , is equal to and item value is then event arises. If condition is then event arises only once when threshold was exceeded. For example, if item value is and after that item value becomes then event arises. When item value becomes the event doesn’t arise. The event will arise again when threshold was exceeded again. Similar situation is for other comparators ( , , ).
Edit
Field | Type | Required | Description |
---|---|---|---|
blockOptions.method.args.item | string | + | Argument declaration of item ID. The value should be in block with name. |
blockOptions.method.args.value | string | + | Argument declaration of item value. The value should be in block with name. |
blockOptions.method.args.comparator | string | + | Argument declaration of comparator state. The value should be in block with name. Possible comparators are , , , , , . |
Edit
"when" : [
{
"blockType":"when",
"blockOptions":{
"method":{
"name":"compareNumbers",
"args":{
"item":"item",
"comparator":"comparator",
"value":"value"
}
}
},
"fields":[
{
"name":"item",
"type":"item",
"value":"5de64f6a70c7be0541cc0853"
},
{
"name":"comparator",
"type":"string",
"value": ">"
},
{
"name":"value",
"type":"int",
"value": 51
}
]
},
{
"blockType":"when",
"blockOptions":{
"method":{
"name":"compareNumbers",
"args":{
"item":"item",
"comparator":"comparator",
"value":"value"
}
}
},
"fields":[
{
"name":"item",
"type":"item",
"value":"5de64f6a70c7be0541cc0854"
},
{
"name":"comparator",
"type":"string",
"value": "<="
},
{
"name":"value",
"type":"float",
"value": 51.55
}
]
}
]