Automation Trigger Single Entity Multiple States - Alarm Panel

Could anyone explain why this automation fails to trigger please? It works when using separate trigger conditions but I need a single trigger using multiple states.

alias: System - Alarm System
description: ''
trigger:
  - platform: state
    entity_id:
      - alarm_control_panel.home_alarm
    to: arming,pending
    id: Alarm Panel Notification
condition: []
action:
  - choose:
      - conditions:
          - condition: trigger
            id: Alarm Panel Notification
        sequence:
          - repeat:
              while:
                - condition: or
                  conditions:
                    - condition: state
                      entity_id: alarm_control_panel.home_alarm
                      state: arming,pending
              sequence:
                - service: switch.turn_on
                  data: {}
                  target:
                    entity_id: switch.internal_buzzer
                - delay:
                    hours: 0
                    minutes: 0
                    seconds: 1
                    milliseconds: 0
    default: []
mode: single

Try this:

trigger:
  - platform: state
    entity_id:
      - alarm_control_panel.home_alarm
    to:
      - arming
      - pending
    id: Alarm Panel Notification

I seem to remember something about the UI editor not handling single line lists properly.

Do the same for your loop condition.

EDIT actually your loop condition has an extranious OR. Just use this:

        sequence:
          - repeat:
              while:
                - condition: state
                  entity_id: alarm_control_panel.home_alarm
                  state: 
                    - arming
                    - pending

This will continue to repeat while either state is true.

Works perfectly, thank you.