Remote control events not detected in automation

Hi,
I have a remote control and a cover called and I want to create a simple automation that opens the cover when I press the remote control.
It doesn’t work, it looks like the trigger is not detected.
I’ve spent some time to debug and tweak with the settings and here’s more info:

I’ve been able to create an automation with a simple button in HA (input_button). When I click on it, it does open the cover, here is the automation in YAML:

- id: '1699126145447'
  alias: Volet avec bouton
  description: ''
  trigger:
  - platform: state
    entity_id:
    - input_button.testbutton
  condition: []
  action:
  - device_id: 4f65b2f80764b593044b325818415be2
    domain: cover
    entity_id: 2c8e30727104c3197a8472ee6ba7163b
    type: set_position
    position: 48
  mode: single

When I create the automation for the remote in the UI, I have a few options in the “trigger” field when I select the remote as device:

  • Télécommande Volet PC Opening opened
  • Télécommande Volet PC Opening closed
  • Télécommande Volet PC Identify has been pressed
  • Télécommande Volet PC Battery battery level changes

I’ve selected the first one (and tried the second one as well), but it doesn’t work, here is the YAML produced:

- id: '1699126145448'
  alias: Volet avec telecommande
  description: ''
  trigger:
  - type: opened
    platform: device
    device_id: 00c1740be528640ae3c52c38d57b9a80
    entity_id: d8cfff194adda0f1c6136540494770bf
    domain: binary_sensor
  condition: []
  action:
  - device_id: 4f65b2f80764b593044b325818415be2
    domain: cover
    entity_id: 2c8e30727104c3197a8472ee6ba7163b
    type: set_position
    position: 50
  mode: single

Therefore, I checked in the event listener and I do get the following event when pressing the remote control:

event_type: zha_event
data:
  device_ieee: 20:91:8a:00:00:19:69:9b
  unique_id: 20:91:8a:00:00:19:69:9b:2:0x0102
  device_id: 00c1740be528640ae3c52c38d57b9a80
  endpoint_id: 2
  cluster_id: 258
  command: up_open
  args: []
  params: {}
origin: LOCAL
time_fired: "2023-11-04T20:04:39.657973+00:00"
context:
  id: 01HEDZ00K9G9A519Y290JRWPQG
  parent_id: null
  user_id: null

So do you have an idea why is my automation not working?
Should I manually edit the yaml with a specific setting?

Thanks a lot for your help!

Hi again,
I’m replying to my own topic, but after asking ChatGPT, I got it working with this YAML:

- id: "1699126145449"
  alias: Volet avec telecommande 2
  description: ""
  trigger:
    - platform: event
      event_type: zha_event
      event_data:
        device_id: 00c1740be528640ae3c52c38d57b9a80
        command: up_open
  condition: []
  action:
    - device_id: 4f65b2f80764b593044b325818415be2
      domain: cover
      entity_id: 2c8e30727104c3197a8472ee6ba7163b
      type: set_position
      position: 50
  mode: single

I still think the UI should be able to make it instead of editing the YAML directly.