[Solved] Aqara Switch, event in eventbus but automation not firing

Hi,

I’m currently upgrading all my 433Mhz sensors and switches to Aqara. Door switches and PIRs were easy to replace, but I can’t figure out why the switch (doorbell) isn’t working. The Mi Home app recognizes the presses, I can see the event in HA’s eventbus, but the actions aren’t triggered.

Logs:

#019-01-10 23:01:34 DEBUG (Thread-30) [xiaomi_gateway] MCAST (report) << {‘short_id’: 43922, ‘sid’: ‘158d00020413e8’, ‘model’: ‘sensor_switch.aq2’, ‘data’: ‘{“status”:“click”}’, ‘cmd’: ‘report’}#
#2019-01-10 23:01:34 DEBUG (MainThread) [homeassistant.components.xiaomi_aqara] PUSH >> : {‘status’: ‘click’}
#2019-01-10 23:01:34 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event xiaomi_aqara.click[L]: click_type=single, entity_id=binary_sensor.switch_158d00020413e8>

Automation:

- alias: '0_Hal_Deurbel_Actions - stuur foto'
  trigger:
    platform: event
    event_type: xiaomi_aqara.click
    event_data:
      entity_id: binary_sensor.switch_158d00020413e8
      click_type: single
  action:
    service: script.turn_on
    entity_id: script.doorbell_actions

And to rule out the script, another automation:

- trigger:
    platform: event
    event_type: xiaomi_aqara.click
    event_data:
      entity_id: binary_sensor.switch_158d00020413e8
      click_type: single 
  action:
    service: persistent_notification.create
    data:
      message: "Switch single click"
      title: "Aqara"

Am I missing something? I’m running v. 0.85.0

nothing obvious to me - I’m assuming the automations are loaded/enabled? Can you manually trigger the automation from your default overview ?

Well, yes but no. It turned out to be the right direction. Yesterday morning I split and moved the automation files, however the file opened in the editor was still saving in the old location. So that explains why the newly added automations weren’t working.

Editing the right automation file fixed it, everything is working as expected now. Thanks for pointing me in the right direction!