upsert_template_entity
Create or update a Home Assistant template entity by name, defining its type and config; reloads the template domain so changes apply without hand-editing YAML.
Instructions
Create or update a template entity (reloads the template domain).
Args: template_type: One of sensor / binary_sensor / switch / button / number / select. name: Display name; also the unique key used for upsert. config: Template config (e.g. {"state": "{{ ... }}", "unit_of_measurement": "d", "icon": "mdi:sprout", "unique_id": "...", ...}).
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": {
"template_type": "<template_type>",
"name": "<name>",
"config": "<config>"
},
"name": "upsert_template_entity"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| config | Yes | ||
| template_type | Yes |