groupToggleValue
- This action toggles a value of every boolean item from the group to the opposite value.
- This feature is available since version
- If action is called, the value should set to an opposite one of all items present in the corresponding group:
- 1.1 item = { type: boolean, value: any }: toggle( item ) -> item.value = not( item.value )
- 1.2 item = { type: int, value = 0 } toggle(item) -> item.value = ( item.value == 0 ? 1 : 0 )
Edit
Field | Type | Required | Description |
---|---|---|---|
blockOptions.method.args.deviceGroup | External Reference, Device Group | + | Device Group identifier. Argument declaration of DeviceGroup ID |
blockOptions.method.args.itemGroup | External Reference, Item Group | + | Item Group Identifier. Argument declaration of ItemGroup ID |
Edit
{
"blockOptions": {
"method": {
"args": {
"deviceGroup": "deviceGroup",
"itemGroup": "itemGroup"
},
"name": "groupToggleValue"
}
},
"blockType": "then",
"fields": [
{
"name": "deviceGroup",
"type": "device_group",
"value": "device_group_id"
},
{
"name": "itemGroup",
"type": "item_group",
"value": "item_group_id"
}
]
}