Add user variable
add_user_variableCreate a new user variable in Domoticz by specifying its name, type, and initial value. Supports integer, float, string, date, and time types.
Instructions
Add var. vtype: 0=Int, 1=Float, 2=Str, 3=Date, 4=Time. Cross-ref: domoticz://user-variables.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"vtype": "<vtype>",
"value": "<value>"
},
"name": "add_user_variable"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | New user variable name | |
| value | Yes | Initial user variable value | |
| vtype | Yes | Variable type: 0 integer, 1 float, 2 string, 3 date, 4 time |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Optional Domoticz response title | |
| status | Yes | Status returned by Domoticz, normally OK |