Hi there, I just started with Home Assistant. I am implementing some automations. I am working on one where “I believe that it would be easier if I could execute a zigbee cluster command directly from the automation”.
A command for example that I am interested in is in the screen shot below:
I use brightness step functions to increase or decrease the brightness of a light bulb step wise. This was easy to do since there is the possibility to use brightness_pct: -20 (which decreases the brightness by 20%; it’s just an example).
For the color temperature I could not find such a “data entry”. The Zigbee cluster command exists though and it works with my light bulb (see screen shot above).
I thought maybe there is a way to offset a cluster command directly somehow? Does anyone know or how did you guys handle it if you had a similar challenge? Appreciate any input.
You can issue zigbee commands using the ZHA provided service zha.issue_zigbee_cluster_command .
Or you can use zha-toolkit’s service zha_toolkit.zcl_cmd .
Both are similar, but zha-toolkit allows you to specify the device using one of its entities, and allows you to specify the number of times the command should be repeated until succes.
Further, zha-toolkit also allows you to send commands that are not know to zigpy or the zha-device-handler (quirk) as it will temporarily add a dummy command to the zigpy internals.
And you get the reply data back (not sure this is the case with zha).
As I am checking the Service UI, I notice that the dir parameter is not proposed - it defaults to 0 and you can add it in yaml if you need something else.
And I notice that the endpoint is not automatically determined at this time.