How to access Blue 2:1 button presses in Home Assistant?

I feel like I missing something extremely obvious here.

I want to use the config/favorites button as a trigger for automations. But there’s no “control entity” in the Zigbee2MQTT implementation that I can call in my automations. How do I do this?

Sadly, I’m not super familiar with YAML, so I’m hoping there is a Z2M blueprint or easy step by step I can follow.

Thank you!

Here’s a start (I don’t have my switches yet, so sharing theory at this point).

Go to Developer toolsEvents. In the data entry field Listen to events enter a * and press the Start listening button. Go to the switch you want to capture the button press on. Press the button. I usually press Stop listening at this point, as there can be lots of events that are generated by your system (not just the switches). Take a look at the button event info.

Here’s some sample output that I see when pressing a button on an Ikea Styrbar remote. Note that I ended up with 14 events in my log just by pressing a single button! The event you are looking for will most likely the Event 0 (last one in the list).

event_type: state_changed
data:
  entity_id: sensor.ikea_styrbar_action
  old_state:
    entity_id: sensor.ikea_styrbar_action
    state: None
    attributes:
      action: null
      battery: 100
      linkquality: 58
      update:
        state: idle
      update_available: false
      icon: mdi:gesture-double-tap
      friendly_name: Ikea Styrbar action
    last_changed: "2022-10-27T22:12:09.424465+00:00"
    last_updated: "2022-10-27T22:12:09.424465+00:00"
    context:
      id: 01GGDR1C2GNCFN0C27EJ6G7RB9
      parent_id: null
      user_id: null
  new_state:
    entity_id: sensor.ikea_styrbar_action
    state: arrow_left_click
    attributes:
      action: arrow_left_click
      battery: 100
      linkquality: 47
      update:
        state: idle
      update_available: false
      icon: mdi:gesture-double-tap
      friendly_name: Ikea Styrbar action
    last_changed: "2022-10-28T02:05:49.034551+00:00"
    last_updated: "2022-10-28T02:05:49.034551+00:00"
    context:
      id: 01GGE5D73AYY2WJ45K28TETV18
      parent_id: null
      user_id: null
origin: LOCAL
time_fired: "2022-10-28T02:05:49.034551+00:00"
context:
  id: 01GGE5D73AYY2WJ45K28TETV18
  parent_id: null
  user_id: null
1 Like

I’m not getting any events triggered by the Blues I have installed for double or triple presses. Interested in hearing the easiest solution here too.

With my Reds I use events combined with Node Red to control my zigbee recessed lights. I think with Blues I could bind the lights I want together with the switch, but might as well use same process as Reds if possible. I don’t mind all the lights not coming on at exact same time.

Edit: Adding an automation with ‘“Up” button triple clicked’ is not triggering my lights getting activated either. Manually triggering in Home Assistant works, but not physical button presses. Possibly related to my poor pairing, signal strength experience too. Who knows.

I’m having the same issue. Using Home Assistant with Zibee2MQTT and Conbee II. No events are being registered on any button presses. Also I don’t get the full options in the device trigger menu.

No problems joining or signal strength but z2m has a problem fully configuring the switches. If you are having problems with signal make sure you use an USB extension cable.

I can bind the switches to Phillips Hue lights and change some of the settings in both z2m and Home Assistant.

Here’s the failure message when trying to configure in z2m
Failed to configure 'Guest Bedroom Switch', attempt 4 (Error: Read *Redacted*/1 haElectricalMeasurement(["acVoltageMultiplier","acVoltageDivisor","acCurrentMultiplier"], {"sendWhen":"immediate","timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Status 'UNSUPPORTED_ATTRIBUTE') at Endpoint.checkStatus (/app/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:317:28) at Endpoint.read (/app/node_modules/zigbee-herdsman/src/controller/model/endpoint.ts:480:22) at Object.readEletricalMeasurementMultiplierDivisors (/app/node_modules/zigbee-herdsman-converters/lib/reporting.js:26:5) at Object.configure (/app/node_modules/zigbee-herdsman-converters/devices/inovelli.js:1219:13) at Configure.configure (/app/lib/extension/configure.ts:115:13) at Configure.onMQTTMessage (/app/lib/extension/configure.ts:55:21))

1 Like

Sheesh, I at least see all the trigger options in ZHA. But doesn’t do me any better if none of them work :slight_smile:
I use an extension cable, just the switch seems to have crappy signal strength analogous to my one ‘aliexpress special’ zigbee bulb that lives in a metal housed fixture.

There’s a fix here for those errors seen in Z2M now.

@roger.hillson are you swapped back to ZHA or using Z2M? Do you see anything in the zha_events when you’re doing single/multi-presses?

Just a note to ensure that you have scene control enabled on the switch. There is a disable scenes for speed (2+ presses all buttons) OR the speed might be set too fast on scene control (100ms increments I believe).

Might be worth toggling the settings around a bit just to ensure they are set on the switch.

1 Like

On ZHA, not getting any events. Didn’t change any of the light delays parameters.

1 Like

Can you confirm HA version and if you go to the device and hit Reconfigure does that change anything?


I hit reconfigure again, I’ll have to report back later when I can physically button press again.

1 Like

I’m back on 2022.9.4, I’ll try and upgrade later tonight when I get a chance as well (Just to add, I do have a prod blue installed now and seeing the events, etc without any changes so at least a closer comparison).

1 Like

So I mashed buttons on my two installed two switches. The one that had hardest time pairing I can’t get HA to recognize any events at all. The one that included first (but still had a hard time), I’m getting intermittent (pretty bad) recognition of events. I still am thinking there is something wrong with my particular examples of this switch.

Hmm, listing to all events, then pressing the buttons on the switch (either the up/down paddles or the config button) generates no events for me :frowning:

In Zigbee2MQTT if you are not seeing any button events, you should go to your switch and do all the button press combinations. Here is my switch (beta hardware) with a fresh reset before:

and after triggering the events from my switch:

That’s frankly the most ridiculous thing I’ve ever…

…oh, it worked.

I have no idea WHY, but that did the trick! I pressed each of the down paddle, up paddle and config button once, double-tap, triple-tap, then held down for 2 seconds…and now suddenly all of those actions are showing up under the “Device” trigger. And are now accessible as triggers for automations!

Thank you!

Yeah, I think it’s the MQTT portion of Z2M. Until those events enter the MQTT space, Home Assistant doesn’t know about them. There might be a way we can improve the herdsman-converter to make them show up without that action, but I unaware of what that could be. The only thing I know of is to send all the events in the configuration portion of the converter, but that may have unexpected consequences if you run a reconfigure.

Button presses are still not working for my switches. I have button delay set to 500ms. When I do any button presses like a double up no event is registered in z2m log or home assistant event listener.

I’ve reset the switches and added the latest inovelli.js file for z2m external convertor.

My button delay is 300ms (instant wouldn’t let double-presses work).

The first time I tried to press every button, it failed too. Then I tried again, very deliberately:

paddle down x1
pause 2 seconds
paddle down x2 (very fast double tap)
pause 2s
paddle down x3
pause 2s
paddle down hold down for 2 seconds
pause 2s
paddle up x1
pause 2s
paddle up x2
pause 2s
paddle up x3
pause 2s
paddle up hold down 2s
pause 2s
config x1
pause 2s
config x2
pause 2s
config x3
pause 2s
config hold down 2s

Go to HA, load up a new automation, select my “Inovelli blue switch” under “Devices” and the actions show up at the top of the list, per NathanFiscus’ images above.

On my second switch, I did it very carefully as above and it worked the first time.

I have to admit I don’t understand at all the Z2M rationale. In my lay perspective, it should absolutely be part of the config/pairing to tell HA “this device has x button functions, and these are their IDs. Make them available.” None of my other Zigbee devices require cycling through all button possibilities before becoming available!

Do you have some examples of hardware that you have that have provided button press events? We can use that as a reference to see what we could do to improve the herdsman-converter.

I’ve used both the aqara button and ikea remote which both have had all options listed.

2 Likes