No entities associated with Zigbee button

I setup ZHA and added an Aqara zigbee button. I am a little confused because though it shows up as a device in the ZHA config, there is no “entity” or that I can passthrough via a homekit bridge. I can however config it via a blueprint (here: ZHA - Aqara Wireless Mini Switch) to trigger different actions within home assistant.

Is there a way to pass this through to homekit? Maybe a dummy button that the zigbee button triggers a press on when zigbee button is pressed?

I tried to passthrough buttons in the homekit bridge but it does not appear, I have been sort of filtering through the device types and include/exclude lists and its not there.

Someone else may have an actual solution for you, but from my limited experience…

Remotes in HA don’t have entity id’s, just devices, and they are ‘scene controllers’ that send events.

You could try to create a new automation and select your device for the trigger, and in the trigger drop-down you should see all of the scenes and value change options that HA has detected as available for the device.

You might also want to use the File Editor Add-On and browse to the Blueprints folder and take a look at the .yaml file for the add-on you’re using to see how they are grabbing the key press events.

As per what mightybosstone has mentioned, the device sends ‘events’ rather than having entities.

You can still use it in the normal way but create triggers based on 'event’s.

eg:

    trigger:
      - platform: event
        event_type: xiaomi_aqara.click
        event_data:
          entity_id: binary_sensor.switch_your_wireless_button
          click_type: single

This may be the wrong rabbit hole, but here is something that I recently learned.

Go to Developer Tools, Events and under Listen to Events, type zha_event then click on Start Listening. Whenever you press a button on the device, you will see how it is reporting.

My Ikea remote produces this:

event_type: zha_event
data:
  device_ieee: 00:0b:57:ff:fe:9b:cb:46
  unique_id: 00:0b:57:ff:fe:9b:cb:46:1:0x0006
  device_id: bb2e292f76d182ffc8c4a2c363793562
  endpoint_id: 1
  cluster_id: 6
  command: toggle
  args: []
  params: {}
origin: LOCAL
time_fired: "2023-12-26T15:45:29.783893+00:00"
context:
  id: 01HJKCTV5QJWRSBV1RMCCQ6H8X
  parent_id: null
  user_id: null

In the Automation Editor - Trigger, select “Manual event”
For “Event type”, enter “zha_event”
In “Event data”…
The person who tipped me to this just puts everything between data: and origin: into the automation Event Data, but I found that you only need at least one of “device_ieee”, “unique_id”, or “device_id”. Watch the spaces.

Here is a complete automation I did recently:

alias: Tradfri Remote 1
description: ""
trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_ieee: 00:0b:57:ff:fe:9b:cb:46
condition: []
action:
  - service: light.toggle
    data:
      color_temp: 153
      transition: 1
    target:
      entity_id: light.ikea_tradfri_bulb_1_light
  - delay:
      hours: 0
      minutes: 0
      seconds: 1
      milliseconds: 0
  - service: light.toggle
    data:
      transition: 1
      color_temp: 153
    target:
      entity_id: light.ikea_tradfri_bulb_2_light
mode: single
1 Like

Another easy way to do this is to use Switch Manager.

Am I correct in saying: your advice helps with using the button within Home Assistant but does not help with getting the button bridged to HomeKit?

True, although I don’t use HomeKit so not sure if there is a work-around. Thinking about a work-around though, you should be able to create a template switch based on the button events and then expose that to HomeKit.