Set Device
ha_set_deviceUpdate device properties such as name, room assignment, disabled state, and labels in Home Assistant. Rename devices or move them to areas to organize your smart home.
Instructions
Update device properties such as name, area, disabled state, or labels.
IMPORTANT: Renaming a device does NOT rename its entities! Device and entity names are independent. To rename entities, use ha_set_entity(new_entity_id=...).
Common workflow for full rename:
ha_set_device(device_id="abc", name="Living Room Sensor") # Rename device
ha_set_entity("sensor.old", new_entity_id="sensor.living_room") # Rename entities separately
PARAMETERS:
name: Sets the user-defined display name (name_by_user)
area_id: Assigns device to an area/room. Use '' to remove from area.
disabled_by: Set to 'user' to disable, or empty to enable
labels: List of labels (replaces existing labels)
EXAMPLES:
Rename device: ha_set_device("abc123", name="Living Room Hub")
Move to area: ha_set_device("abc123", area_id="living_room")
Disable device: ha_set_device("abc123", disabled_by="user")
Enable device: ha_set_device("abc123", disabled_by="")
Add labels: ha_set_device("abc123", labels=["important", "sensor"])
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | New display name for the device (sets name_by_user) | |
| labels | No | Labels to assign to the device (replaces existing labels) | |
| area_id | No | Area/room ID to assign the device to. Use empty string '' to unassign. | |
| device_id | Yes | Device ID to update | |
| disabled_by | No | Set to 'user' to disable, or None/empty string to enable |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||