How to listen for button presses on Zigbee Remote control

I got a EGLO connect.z Smart Home Remote Control 2.0 from amazon to have a way of controlling my HASS from a wide radius when the network shits itself. Initially i hoped it would just expose every button as entity so i can just listen to the button press in automations. But it only exposes some unuseful entities sadly. Now i know that the commands from the buttons have to go through zigbee so HASS must recieve them at some point so i was wondering how i can get HASS to catch those and use them. I was told there was a trick with listening to zha_events on http://homeassistant.local:8123/developer-tools/event but sadly that does not trigger anything for me and another person i asked to test it.

Are all the events from this remote recognised by ZHA? I can’t see it on the Blackadder list (although that doesn’t mean it won’t work - just that nobody has tried it). There are no references to it in the ZHA device handlers issues list either.

It does appear to be supported by Z2M:

You may have to find or construct a custom quirk.

@Stiltjack Can you test the zha_event monitoring in dev tools? I don’t have ZHA setup on any of my instances here, so I can’t test it. But, it’s curious to me that @Bluscream doesn’t see any events coming in on the zha_event bus. :thinking:

I have found the code where they seem to implement the remote:

Sadly i am not knowledged enough to know how to convert any of this to a custom quirk myself. Any help would be appreciated. I am going to attach some logs and debug files/events

Since i cannot attach non-images here i uploaded the files at Zigbee zha EGLO 99099 3 groups remote controller debugging · GitHub

I have also found a custom quirk PR that supposedly adds support for the device at Issues · zigpy/zha-device-handlers · GitHub, but none of the identifiers from any of my debug logs appear in that, instead it says TLSR82xx which i cant find anywhere for my remote

So in the end i got it to work by buying a second Zigbee stick and running Zigbee2MQTT only for the remote control. I have taken some time to create quite a elaborate Automation for it so if it saves someone in the future some time, here you go. It requires a input_number.zigbee_remote_profile number helper that allows for different layouts to be switched to so the remote can theoretically have a infinite number of buttons

alias: Zigbee Remote Buttons
description: Handles various actions triggered by Zigbee remote buttons
trigger:
  - platform: mqtt
    topic: zigbee2mqtt/Zigbee Remote Control/action
condition: []
action:
  - choose:
      - conditions:
          - condition: state
            entity_id: input_number.zigbee_remote_profile
            state: "1.0"
        sequence:
          - choose:
              - conditions:
                  - condition: template
                    value_template: "{{ trigger.payload == \"color_temperature_step_up\" }}"
                sequence:
                  - service: fan.toggle
                    target:
                      entity_id: fan.ventilator
                    data: {}
              - conditions:
                  - condition: template
                    value_template: "{{ trigger.payload == \"color_temperature_step_down\" }}"
                sequence:
                  - service: switch.toggle
                    target:
                      entity_id: switch.timos_a_c_socket_switch
                    data: {}
              - conditions:
                  - condition: template
                    value_template: "{{ trigger.payload == \"brightness_step_down\" }}"
                sequence:
                  - service: light.turn_on
                    data:
                      brightness_step_pct: -25
                    target:
                      entity_id:
                        - light.ceiling_light_local
              - conditions:
                  - condition: template
                    value_template: "{{ trigger.payload == \"brightness_step_up\" }}"
                sequence:
                  - service: light.turn_on
                    data:
                      brightness_step_pct: 25
                    target:
                      entity_id: light.ceiling_light_local
              - conditions:
                  - condition: template
                    value_template: "{{ trigger.payload == \"recall_1\" }}"
                sequence:
                  - service: light.toggle
                    metadata: {}
                    data: {}
                    target:
                      entity_id:
                        - light.floodlight_api
              - conditions:
                  - condition: template
                    value_template: "{{ trigger.payload == \"recall_2\" }}"
                sequence:
                  - service: switch.toggle
                    target:
                      entity_id: switch.timo_pc
                    data: {}
              - conditions:
                  - condition: template
                    value_template: "{{ trigger.payload == \"red\" }}"
                sequence:
                  - service: light.turn_on
                    data:
                      color_name: red
                    target:
                      entity_id: light.my_lights_color
              - conditions:
                  - condition: template
                    value_template: "{{ trigger.payload == \"green\" }}"
                sequence:
                  - service: light.turn_on
                    data:
                      color_name: green
                    target:
                      entity_id: light.my_lights_color
              - conditions:
                  - condition: template
                    value_template: "{{ trigger.payload == \"blue\" }}"
                sequence:
                  - service: light.turn_on
                    data:
                      color_name: blue
                    target:
                      entity_id:
                        - light.my_lights_color
              - conditions:
                  - condition: template
                    value_template: "{{ trigger.payload == \"refresh\" }}"
                sequence:
                  - service: switch.toggle
                    target:
                      entity_id: switch.party_my_lights
                    data: {}
              - conditions:
                  - condition: template
                    value_template: "{{ trigger.payload == \"off\" }}"
                sequence:
                  - service: light.toggle
                    target:
                      entity_id: light.ceiling_light
                    data: {}
      - conditions:
          - condition: state
            entity_id: input_number.zigbee_remote_profile
            state: "2.0"
        sequence:
          - choose:
              - conditions:
                  - condition: template
                    value_template: "{{ trigger.payload == \"color_temperature_step_up\" }}"
                sequence:
                  - service: fan.toggle
                    target:
                      entity_id: fan.ventilator
                    data: {}
              - conditions:
                  - condition: template
                    value_template: "{{ trigger.payload == \"color_temperature_step_down\" }}"
                sequence: null
              - conditions:
                  - condition: template
                    value_template: "{{ trigger.payload == \"brightness_step_down\" }}"
                sequence: null
              - conditions:
                  - condition: template
                    value_template: "{{ trigger.payload == \"brightness_step_up\" }}"
                sequence: null
              - conditions:
                  - condition: template
                    value_template: "{{ trigger.payload == \"recall_1\" }}"
                sequence: null
              - conditions:
                  - condition: template
                    value_template: "{{ trigger.payload == \"recall_2\" }}"
                sequence: null
              - conditions:
                  - condition: template
                    value_template: "{{ trigger.payload == \"red\" }}"
                sequence: null
              - conditions:
                  - condition: template
                    value_template: "{{ trigger.payload == \"green\" }}"
                sequence: null
              - conditions:
                  - condition: template
                    value_template: "{{ trigger.payload == \"blue\" }}"
                sequence: null
              - conditions:
                  - condition: template
                    value_template: "{{ trigger.payload == \"refresh\" }}"
                sequence: null
              - conditions:
                  - condition: template
                    value_template: "{{ trigger.payload == \"off\" }}"
                sequence:
                  - service: light.toggle
                    metadata: {}
                    data: {}
                    target:
                      entity_id:
                        - light.floodlight_api
    default: []
mode: queued
max: 10