deCONZ events not triggering automation completely

Hi all,

Let me warn you guys upfront i’m new to Home Assistant so I could be doing something wrong myself. I’m currently in the proces of migrating from Zwave and Domticz to Zigbee and Home Assistant. I got a bunch of Aqare wall plugs to boost the Zigbee network and lots of Philips Hue light bulbs. I’m using deCONZ which is installed on a virtual machine on a proxmox hypervisor with the ConBee II USB stick. So far all works great until i’ve added a Friends of Hue SENIC switch.

I created an automation which activates a HA scene:

Automation

id: '1628772817224'
alias: 'Wandschakelaar: Knop 3 - Kort'
description: ''
trigger:
  - device_id: 371d20f713af452407ebca51248f2655
    domain: deconz
    platform: device
    type: remote_button_short_release
    subtype: button_3
condition: []
action:
  - scene: scene.dagverlichting
mode: restart
max: 10

This scene is specified below and uses the groups from deCONZ (i’ve also tested it with HA groups).

Scene

- id: '1628770490541'
  name: Dagverlichting
  entities:
    light.eetkamer_2:
      min_mireds: 153
      max_mireds: 500
      supported_color_modes:
      - color_temp
      color_mode: color_temp
      brightness: 254
      color_temp: 230
      is_deconz_group: true
      all_on: true
      friendly_name: Eetkamer
      supported_features: 40
      state: 'on'
    light.keuken_2:
      min_mireds: 153
      max_mireds: 500
      supported_color_modes:
      - color_temp
      color_mode: color_temp
      brightness: 228
      color_temp: 285
      is_deconz_group: true
      all_on: true
      friendly_name: Keuken
      supported_features: 40
      state: 'on'
  icon: mdi:weather-sunny

When looking in the developer-tool section in HA and checking the deconz_event I see them being triggered so thats good.

Events

Gebeurtenis 1 uitgevoerd 20:42:
{
    "event_type": "deconz_event",
    "data": {
        "id": "schakelaar",
        "unique_id": "00:00:00:00:01:72:b7:11",
        "event": 3001,
        "device_id": "371d20f713af452407ebca51248f2655"
    },
    "origin": "LOCAL",
    "time_fired": "2021-08-12T18:42:17.281884+00:00",
    "context": {
        "id": "49d21d1f1d275f0860748445ff7bef1b",
        "parent_id": null,
        "user_id": null
    }
}
Gebeurtenis 0 uitgevoerd 20:42:
{
    "event_type": "deconz_event",
    "data": {
        "id": "schakelaar",
        "unique_id": "00:00:00:00:01:72:b7:11",
        "event": 3000,
        "device_id": "371d20f713af452407ebca51248f2655"
    },
    "origin": "LOCAL",
    "time_fired": "2021-08-12T18:42:16.770457+00:00",
    "context": {
        "id": "b9fa198718fc68f5587fd7ebd509dfb0",
        "parent_id": null,
        "user_id": null
    }
}

And now the problem occurs. I need to click sometimes 8 times on the button before both light.keuken_2 and light.eettafel_2 are activated and the correct colors are disabled and the correct brightness level has been set. Sometimes this happens after 3 times pushing, and other times it takes 5 clicks. When activating the automation itself everything works fine. So it looks like deconz_event types are not processed correctly or at-least the automation is only executed half or half of the time.

What am I doing wrong and what could I do more to find a solution to my problem?

Cheers!

What happens if you activate the scene outside the automation?

Maybe try to trigger directly on the event.
Those “device” events are a big black box.

  trigger:
    platform: event
    event_type: deconz_event    
    event_data:
      id: schakelaar
      event: 3001