Automation Multiple Repeat Task does not work

Hi,

I would like to notify with 2 mobiles phones. It works individually. But if I put 2 repeat, only first phone received notification. I need a while, because I use a boolean to enable or disable notification for specific mobile.

Thanks a lot,


alias: TEST
description: ''
trigger:
  - platform: state
    entity_id: binary_sensor.lumi_lumi_sensor_magnet_aq2_xxxxx_on_off
    from: 'off'
    to: 'on'
condition:
  - condition: state
    entity_id: input_boolean.alarm_activation
    state: 'on'
action:
  - repeat:
      while:
        - condition: state
          entity_id: input_boolean.alarm_notification_phone1
          state: 'on'
      sequence:
        - service: notify.mobile_app_pra_lx1
          data:
            message: TEST
            title: TEST
        - delay:
            hours: 0
            minutes: 0
            seconds: 5
            milliseconds: 0
  - repeat:
      while:
        - condition: state
          entity_id: input_boolean.alarm_notification_phone2
          state: 'on'
      sequence:
        - service: notify.mobile_app_sm_a505fn
          data:
            message: TEST
            title: TEST
        - delay:
            hours: 0
            minutes: 0
            seconds: 5
            milliseconds: 0	 
mode: single

Just make two automations - one for each phone.

you might be able to do it with one automation but at a certain point it might become more complex than to just use two automations and be done with it.

or you can use one automation and use two scripts (one for each phone) and call both of those at the same time from the same automation. then in the scripts do the condition checking and repeat actions for the specific phones.