core: HomeKit Connected Aqara Mini Button not triggering press automations until Home Assistant is restarted

The problem

I recently bought a aqara mini button and a hub and connected to the aqara app and paired with home assistant using the home kit controller but after making an automation to recognize each press type and do something with it the automation doesn’t seem to be triggered when I click the button. (The aqara app records the press so the button is working)

Image of the automation trigger setup: image

Image of the Button device data: image

What version of Home Assistant Core has the issue?

core-2022.9.5

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

Homekit Controller

Link to integration documentation on our website

https://www.home-assistant.io/integrations/homekit_controller

Diagnostics information

homekit_controller-a5c6c1e1a2c8ceda4cf166859bc6d145-Button-364308a6081a4068d16fca645237982d.json.txt

Example YAML snippet

alias: HA - Turn on Pool Lights on Button Click
description: |-
  There is a button in the door between the pool area and the living room.
  Single Click - Turns on the dinner lights
  Double Click - Turns all lights in the pool area
  Long Press - Turns of all lights in the pool area
trigger:
  - platform: device
    device_id: 364308a6081a4068d16fca645237982d
    domain: homekit_controller
    type: button1
    subtype: single_press
    id: single-press
  - platform: device
    device_id: 364308a6081a4068d16fca645237982d
    domain: homekit_controller
    type: button1
    subtype: double_press
    id: double-press
  - platform: device
    device_id: 364308a6081a4068d16fca645237982d
    domain: homekit_controller
    type: button1
    subtype: long_press
    id: long-press
condition: []
action:
  - choose:
      - conditions:
          - condition: trigger
            id: single-press
        sequence:
          - service: switch.toggle
            data: {}
            target:
              entity_id: switch.pool_dinner_table_lights
      - conditions:
          - condition: trigger
            id: double-press
        sequence:
          - service: switch.turn_on
            data: {}
            target:
              entity_id:
                - switch.pool_dinner_table_lights
                - switch.pool_lights
      - conditions:
          - condition: trigger
            id: long-press
        sequence:
          - service: switch.turn_off
            data: {}
            target:
              entity_id:
                - switch.pool_lights
                - switch.pool_dinner_table_lights
mode: single

Anything in the logs that might be useful for us?

No response

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 23 (10 by maintainers)

Commits related to this issue

Most upvoted comments

# Example configuration.yaml entry
logger:
  default: info
  logs:
    homeassistant.components.homekit_controller: debug
    aiohomekit: debug

Bit hard to do yaml config fragments on my phone sorry. And busy evening. I’ll try and get to a computer and post something later but might not make it.