scripts/modify_item
- Manually modify some item fields.
Edit
Field | Type | Required | Description |
---|---|---|---|
item_id | string | + | item ID to modify |
item | table | + | format of table is described in core.modify_item command. |
Edit
Edit
Edit
{
"method": "extensions.plugin.run",
"id": "_ID_",
"params": {
"script": "HUB:test_plugin/scripts/modify_item",
"scriptParams": {
"item_id": "5f18095946aaf06f4005043c",
"item": {
"name": "switch",
"value_type": "bool",
"value": false,
"has_getter": false,
"has_setter": true,
"device_id": "5f16acb446aaf03ea2095e03"
}
}
}
}
Edit
{
"error": null,
"id": "_ID_",
"result": {}
}