Example 4: compare value of any item that matches the device/item group with numeric type:
Define a device group, define an item group, make a condition block to make a comparison of an hub.item.updated broadcast with the condition value. The comparison is stateless. It doesn’t have information about previous value of any item in the group.
Comparison type: stateless
{
"blockType":"when",
"blockOptions":{
"method":{
"name":"compareNumbers",
"args":{
"deviceGroup":"deviceGroup",
"itemGroup":"itemGroup",
"comparator":"comparator",
"value":"value"
}
}
},
"fields":[
{
"name":"deviceGroup",
"type":"device_group",
"value":"5de64f6a70c7be0541cc0853"
},
{
"name":"itemGroup",
"type":"item_group",
"value":"5de64f6a70c7be0541cc0854"
},
{
"name":"comparator",
"type":"string",
"value": ">"
},
{
"name":"value",
"type":"int",
"value": 51
}
]
}
Available since: Group operations filtering is available since