[xiaomi gateway] Double click on smart button


I’m trying to add a double click function on my Xiaomi gateway to turn on an additional light. Ive read the following:

Also, checked others posts but somehow I can’t seem to get this to work:

    - key: #coderemoved

- alias: Double Click to toggle living room lamp
    platform: event
    event_type: click
      entity_id: binary_sensor.switch_158d000xxxxxc2
      click_type: double
    service: light.toggle
      entity_id: light.hall #philipshue


Yes, I know the code is set wrong now. I also try to put it underneath:

automation: !include automations.yaml
[code snipped]

Anyone care to help me out?

… uhhh well correct it and it should work fine. Don’t put the automation underneath the automation: !include automations.yaml but inside the automation.yaml and remove the first trigger:

I thought I tried everything. Thank you, this now shows up in Hassio.

My thinking was that ‘switch_158d000xxxxxc2’ would be linked to the top button on the Gateway. This doesn’t seem to be the case. By double clicking the default ‘arming’ turns on.

Is it possible to reprogram the button to turn on a light?

Do you actually have a switch? It seems you copied the entity_id from the docs. Please check the supported devices.

Hi Sjee,

Yes, I do have a Aqara switch. Using it for something else. Anyway, hoped that I could somehow get the id of the button on the gateway.

did you get it work? if not there is easy way , just enter to your HA config website at IP:PORT/dev-state

and see if the HomeAssitant have Recognized the switch , its need to be something like :
Depending on the type of button

As the gateway button is not being supported, it won’t show up the dev-state page :frowning:

Ahhh I missed that we’re talking about the button on the Gateway :bowing_man:

1 Like

Yes, noticed the confusion. Thanks for reaching out tough!

1 Like