ZHA support for device binding to specific clusters or endpoints

This gap has been raised in the forum before:
ZHA - binding to specific endpoints? - Configuration / Zigbee - Home Assistant Community (home-assistant.io)

In my scenario, I have a remote (Somfy Ysia 5 HP Zigbee) which needs to be bound to motorized window coverings (Somfy Sonesse Zigbee motors). This remote has 5 endpoints, one for each channel.

Through ZHA I can bind specific clusters on an endpoint to a Zigbee group, but I can’t bind specific clusters directly to a device:


The underlying websocket API doesn’t support additional parameters on zha/devices/bind either to support this.

I can set up this binding using zha-toolkit from HACS, but it shouldn’t be necessary to use an extension to set up a simple binding like this.

Sample zha_toolkit command to achieve this binding for anyone who hits the same problem:

action: zha_toolkit.bind_ieee
data:
  ieee: 4c:c2:06:19:xx:xx:xx:xx
  command_data: 4c:c2:06:ff:xx:xx:xx:xx
  endpoint: 1 # [1-5] for the SOMFY Ysia 5 remote's channels
  dst_endpoint: 1
  cluster: 258  # 0x0102 (258) for window coverings, and 0x0005 (5) for scenes both need to be bound for this scenario

The feature request:

  1. ZHA should support selecting the cluster/endpoints for direct device binding
  2. For the existing list for group binding, a column should be added to specify the endpoint (for devices with multiple endpoints with duplicated clusters) so they can be disambiguated