z2m_rename_device
Rename a Zigbee2MQTT device's friendly name, updating its MQTT topic. Optionally also rename the Home Assistant entity to keep automations and dashboards working.
Instructions
Rename a device's friendly_name. Renaming changes its MQTT topic, so anything referencing the old name (automations, dashboards, scripts) breaks until updated — this is reversible only by renaming back. Set homeassistant_rename to also rename the Home Assistant entity. Use z2m_set_device_options for behaviour changes that do not affect the topic.
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": {
"device": "<device>",
"new_name": "<new_name>"
},
"name": "z2m_rename_device"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device | Yes | Device friendly_name or ieee_address. | |
| new_name | Yes | New friendly_name. '/' creates folder structure in MQTT. | |
| homeassistant_rename | No | Also update the Home Assistant entity ID. Default false. |