Xiaomi Aqara Mini Switch doesn't show switch

A 2nd developer has completely by surprise contributed their own implementation of stateless switches for homekit_controller. So we’ve gone from having no PR’s to 2 competing ones!

(Obviously we are looking at how to work together to get one of them done).

Looking more and more likely that I won’t need to take up your kind offer of help @mivilleb!

Can you link to this implementation please?

1 Like

hi my friend,

what is the latest state integration?
I’m excitedly waiting for it to result. i have Home Assistant 0.115.4 but not yet my mini switch work

Both of my PR’s were merged a while back, but they were too late for any of the 0.115 tags as the beta testing process had already started. But now the are merged short of a disaster during he next beta test it should be in 0.116.0 AIUI.

now it work perfeckly.thanks everythink :))

Hi, It is working great now. Thanks.

I can create automations that work fine, but there is a way of using this stateless switches in Node-RED?

Hi @cecheto ,

I see the device but I dont see any events.

How did you manage to get events from the wireless switch to HA ?

Hi,
In my installation when I select the device in the Automations UI I can see four triggers for the one button switch: single_press, double_press, long_press and changes in battery level. For the double button ones its the same with the additional single, double, long press for the second button.
The problem is with Node-RED, the device is available, but there are no events available except for then battery load.

Hi Guys,

In my setup I have 2xXiaomi Gateway(Aqara) with plenty of sensors attached. It all works perfectly.
Recently I bought ZHWG11LM (discovered by HA, 8 digit code entered, no problem)

I moved one Aqara Temp/Hum/Press sensor (square one) from my old Xiaomi Gateway (Aqara) to the brand new ZHWG11LM and… now I can read only Temp/Hum. The pressure indication is gone.
I also moved one round Xiaomi wireless switch to the ZHWG11LM and I can see only a battery level.
Is there any chance to fix it somehow?
THX.

You will see the devices in the automations in HA. As well as the triggers for the button presses.

I haven’t been able to read the events directly in Node-RED yet either. What I did as a temporary work around was to create an automation for each button and press type (tedious I know) and as part of the automation flow for the button I set an option in a input_select helper, which I read from Node-RED. This way the one input_select entity has all the states for each button and press type.

Thanks @cecheto,

It works perfectly. Just curious, seems the “button pressed” is not a state of the device, nor an event (not found in the developer tools page) How is it bounded with the Stateless_Switch device?

Hi, I arrived to almost the same setup, but what I did is one automation with all the buttons, all de “presses” and “long presses” and just one action. Send an event, “wireless_remote_switch” and in the data I placed thee device, the button and the type of event:

event: wireless_remote_switch
event_data:
  device: '{{ trigger.device_id }}'
  type: '{{ trigger.type }}.{{ trigger.subtype }}'

The good thing is that I only have an automation for all of them and need only two switch nodes to get the desired event. When I want to add another switch I just add it to the same automation.

Después de meses y meses con problemas de compatiblidad de HA con el HomeKit de Xiaomi, queda patente que por el momento ni es compatible, ni funciona bien.
Dada la importancia que tiene Xiaomi en el mundo de la domótica, creo que pasen meses y más meses sin que se consiga compatibilidad aceptable con HomeKit es una piedra en el camino muy gorda para HA, una pena que se escuden en que “es gratis”, para justificar que no funciona.
Puede ser gratis, pero es imporante que alguien ponga un poco de orden si alguien quiere que HA perdure el tiempo.
Muchas gracias.

It works but only for 1 button, even though i use 2 buttons switch, i can trigger only 1 of them.

For me it works perfectly, No problems with both buttons and single, double y longpress.

I explained my solution here: How to use stateless programmable switch?

1 Like

Did you ever find a solution to your issue? I have an Aqara wireless two button switch, paired with an Aqara Hub that is connected to HA through the homekit controller integration. I can only trigger automations on one of the buttons, but not the second. However, both buttons appear in the HomeKit Controller entity map. Not quite sure what i can do next!

If you still need help with this please file an issue on GitHub, fill in the template, and if the bot doesn’t mention @Jc2k automatically when you submit it then send me a private message with a link to the ticket. Attach your .storage/homekit_controller-entity-map.

Still having the same issue, i can only see 1 button but using a double rocker switch