Using Aqara mini switch entity causes HA to reboot

I have an Aqara mini switch and when I use it’s entity as a trigger as shown circled in red below, it causes Home Assistant to reboot. This has occurred to me several times. One time I had a TTS message as part of the action, and it just kept looping. I restarted HA to stop it.

If I use the device as a trigger, it works fine as shown below. I’ve included the YAML, not much to it.

I can use the device for now, just trying to understand why this issue occurs when using the entity.

alias: Aqara Test
description: ""
triggers:
  - device_id: 01b074a382d5ff6525328bbf1867029b
    domain: zha
    type: remote_button_short_press
    subtype: remote_button_short_press
    trigger: device
    enabled: false
  - trigger: state
    entity_id:
      - automation.aqara
conditions: []
actions: []
mode: single

If this is your actual automation, it’s messed up.
That trigger will happen if you enable the automation. Changing the state of automations is not a normal thing, and is really only useful for turning on things seasonally or similar, not for daily operations. The state of an automation represents if the automation trigger is allowed to look for events or not, and has nothing to do with if the automation is triggered or not.
There is also there is no action, so what are the triggers for.
Beyond that, I do not recommend device_ids for automatons at all for reasons…

I am unable to use an entity for this automation for some reason. If I select the button press entity, it includes that “changes state or any attributes” for some reason. So I’m using the device and its working fine now.

-Thanks



alias: Aqara Home Away - Button - Pushed
description: ""
triggers:
  - device_id: 01b074a382d5ff6525328bbf1867029b
    domain: zha
    type: remote_button_short_press
    subtype: remote_button_short_press
    trigger: device
conditions: []
actions:
  - action: automation.turn_off
    metadata: {}
    data:
      stop_actions: true
    target:
      entity_id: automation.doorbell_motion_detection_notification
    enabled: true
  - action: media_player.volume_set
    metadata: {}
    data:
      volume_level: 0.15
    target:
      entity_id: media_player.office
    enabled: true
  - action: tts.speak
    metadata: {}
    data:
      cache: true
      message: Doorbell motion detection disabled for 5 minutes
      media_player_entity_id: media_player.office
    target:
      entity_id: tts.google_translate_en_com
    enabled: true
  - delay:
      hours: 0
      minutes: 5
      seconds: 0
      milliseconds: 0
    enabled: true
  - action: automation.turn_on
    metadata: {}
    data: {}
    target:
      entity_id: automation.doorbell_motion_detection_notification
    enabled: true
mode: single