Set a Zigbee cluster attribute
Use this action to write a value directly to a Zigbee cluster attribute on a device. This is a low-level tool for fine-tuning device behavior or working around device quirks that aren’t exposed through the regular entities. You need to know the device’s IEEE address, the endpoint, the cluster, and the attribute you want to change.
Only users with administrator rights can run this action.
Using this action from the user interface
If you prefer building automations and scripts visually, Home Assistant walks you through this action step by step. You pick what to target, tweak a few options, and save. No YAML knowledge required.
To set a cluster attribute from an automation or a script:
- Go to Settings > Automations & scenes.
- Open an existing automation or script, or select Create automation > Create new automation.
- If you’re setting up a new automation, add a trigger in the When section. Scripts don’t need a trigger. They run when something else calls them.
- In the Then do section, select Add action.
- Search for and select Set Zigbee cluster attribute.
- Fill in the device, endpoint, cluster, attribute, and value.
- Select Save.
Options in the UI
Whether the cluster is an input (server) or output (client) cluster. Defaults to input.
Using this action in YAML
If you work directly in YAML, or you want to know exactly what Home Assistant does under the hood, this section has the technical reference. It lists the field names you use in YAML, their types, and which ones are required.
In YAML, refer to this action as zha.set_zigbee_cluster_attribute. A basic example looks like this:
action: zha.set_zigbee_cluster_attribute
data:
ieee: "00:0d:6f:00:05:7d:2d:34"
endpoint_id: 1
cluster_id: 8
attribute: 17
value: 50
Options in YAML
Whether the cluster is an input (server) or output (client) cluster, set as in or out. Defaults to in.
Good to know
- Cluster, attribute, and endpoint IDs are specific to each device. You can look them up on the device’s page under Manage clusters.
- Writing the wrong value to an attribute can cause a device to behave unexpectedly. Double-check the values before you run the action.
Still stuck?
The Home Assistant community is quick to help: join Discord for real-time chat, post on the community forum with the action you’re calling and what you expected to happen, or share on our subreddit /r/homeassistant.
AI assistants like ChatGPT or Claude can also explain actions or suggest the right one when you describe what you want in plain language.
Related actions
These actions work well alongside this one:
-
Issue a Zigbee cluster command: Sends a command to a Zigbee cluster on a device.
-
Issue a Zigbee group command: Sends a command to a Zigbee cluster on a group of devices.