Automation to Trigger Cleaning in Specific Rooms Based on My Actionable Notification Selection

I’m creating an automation in Home Assistant that triggers when I leave the house. The goal is to send a notification to my phone asking which rooms I’d like my Roborock Q5 Pro to clean. The options include the family room, kitchen, living room, hall, open areas (areas in the house without doors leading to other rooms), or the entire house. Once I make a selection, the automation waits for my response and sends the corresponding cleaning command to the vacuum. However, while I do receive a notification with all of the options on my phone, once I select the room I wish to clean, nothing happens. I’m not sure what the issue is, so any help or suggestions would be very much appreciated!

Here is the automation yaml that I have so far:

alias: Actionable Clean | House Area
description: ""
triggers:
  - trigger: state
    entity_id:
      - device_tracker.<username>_iphone
    from: home
    to: not_home
conditions: []
actions:
  - action: notify.mobile_app_<username>_iphone
    data:
      message: Which rooms would you like Roxy to clean?
      title: Auto Cleaning
      target: mobile_app_<username>_iphone
      data:
        actions:
          - action: family_room
            title: Family Room
          - action: kitchen
            title: Kitchen
          - action: living_room
            title: Living Room
          - action: hall
            title: Hall
          - action: room_<room_number>
            title: Room
          - action: open_areas
            title: Open Areas
          - action: entire_house
            title: Entire House
          - action: skip_cleaning
            title: Skip Cleaning
  - wait_for_trigger:
      - trigger: event
        event_type: mobile_app_notification_action
        event_data:
          action: family_room
        id: clean_family_room
      - trigger: event
        event_type: mobile_app_notification_action
        event_data:
          action: kitchen
        id: clean_kitchen
      - trigger: event
        event_type: mobile_app_notification_action
        event_data:
          action: living_room
        id: clean_living_room
      - trigger: event
        event_type: mobile_app_notification_action
        event_data:
          action: hall
        id: clean_hall
      - trigger: event
        event_type: mobile_app_notification_action
        event_data:
          action: room_<room_number>
        id: clean_room
      - trigger: event
        event_type: mobile_app_notification_action
        event_data:
          action: open_areas
        id: clean_open_areas
      - trigger: event
        event_type: mobile_app_notification_action
        event_data:
          action: entire_house
        id: clean_entire_house
      - trigger: event
        event_type: mobile_app_notification_action
        event_data:
          action: skip_cleaning
        id: clean_skip_cleaning
    timeout:
      hours: 0
      minutes: 3
      seconds: 0
    continue_on_timeout: false
  - choose:
      - conditions:
          - condition: trigger
            id: clean_family_room
        sequence:
          - action: vacuum.send_command
            target:
              entity_id: vacuum.q5_pro
            data:
              command: app_segment_clean
              params:
                - segments:
                    - 16
      - conditions:
          - condition: trigger
            id: clean_kitchen
        sequence:
          - action: vacuum.send_command
            target:
              entity_id: vacuum.q5_pro
            data:
              command: app_segment_clean
              params:
                - segments:
                    - 17
      - conditions:
          - condition: trigger
            id: clean_living_room
        sequence:
          - action: vacuum.send_command
            target:
              entity_id: vacuum.q5_pro
            data:
              command: app_segment_clean
              params:
                - segments:
                    - 24
      - conditions:
          - condition: trigger
            id: clean_living_room
        sequence:
          - action: vacuum.send_command
            target:
              entity_id: vacuum.q5_pro
            data:
              command: app_segment_clean
              params:
                - segments:
                    - 24
      - conditions:
          - condition: trigger
            id: clean_hall
        sequence:
          - action: vacuum.send_command
            target:
              entity_id: vacuum.q5_pro
            data:
              command: app_segment_clean
              params:
                - segments:
                    - 23
      - conditions:
          - condition: trigger
            id: clean_room
        sequence:
          - action: vacuum.send_command
            target:
              entity_id: vacuum.q5_pro
            data:
              command: app_segment_clean
              params:
                - segments:
                    - 21
      - conditions:
          - condition: trigger
            id: clean_open_areas
        sequence:
          - action: vacuum.send_command
            target:
              entity_id: vacuum.q5_pro
            data:
              command: app_segment_clean
              params:
                - segments:
                    - 16
                    - 17
                    - 23
                    - 24
      - conditions:
          - condition: trigger
            id: clean_entire_house
        sequence:
          - action: vacuum.send_command
            target:
              entity_id: vacuum.q5_pro
            data:
              command: app_segment_clean
              params:
                - segments:
                    - 16
                    - 17
                    - 18
                    - 19
                    - 20
                    - 21
                    - 22
                    - 23
                    - 24
                    - 26
mode: single

The source of your issue is the condition type shown above. Trigger conditions only work with main triggers, not those of a Wait for Trigger. As shown in the actionable notifications docs, you need to use a template condition.

conditions: "{{ wait.trigger.event.data.action == 'family_room' }}"

Thank you for the help Didgeridrew.

I have added the new yaml below, and while I tried to follow the instructions you gave to the best of my ability, it still does not work.

alias: Actionable Clean | House Area
description: ""
triggers:
  - platform: state
    entity_id: device_tracker.<device_name>
    from: home
    to: not_home
conditions: []
actions:
  - service: notify.mobile_app.<mobile_app_name>
    data:
      message: "Which rooms would you like to clean?"
      title: "Auto Cleaning"
      data:
        actions:
          - action: "family_room"
            title: "Family Room"
          - action: "kitchen"
            title: "Kitchen"
          - action: "living_room"
            title: "Living Room"
          - action: "hall"
            title: "Hall"
          - action: "room_1"
            title: "Room 1"
          - action: "open_areas"
            title: "Open Areas"
          - action: "entire_house"
            title: "Entire House"
          - action: "skip_cleaning"
            title: "Skip Cleaning"
  - wait_for_trigger:
      - event_type: mobile_app_notification_action
        trigger: event
    timeout: "00:03:00"
    continue_on_timeout: false
  - choose:
      - conditions:
          - condition: template
            value_template: "{{ wait.trigger.event.data.action == 'family_room' }}"
        sequence:
          - target:
              entity_id: vacuum.<vacuum_name>
            data:
              command: app_segment_clean
              params:
                segments:
                  - 16
            action: vacuum.send_command
      - conditions:
          - condition: template
            value_template: "{{ wait.trigger.event.data.action == 'kitchen' }}"
        sequence:
          - target:
              entity_id: vacuum.<vacuum_name>
            data:
              command: app_segment_clean
              params:
                segments:
                  - 17
            action: vacuum.send_command
      - conditions:
          - condition: template
            value_template: "{{ wait.trigger.event.data.action == 'living_room' }}"
        sequence:
          - target:
              entity_id: vacuum.<vacuum_name>
            data:
              command: app_segment_clean
              params:
                segments:
                  - 24
            action: vacuum.send_command
      - conditions:
          - condition: template
            value_template: "{{ wait.trigger.event.data.action == 'hall' }}"
        sequence:
          - target:
              entity_id: vacuum.<vacuum_name>
            data:
              command: app_segment_clean
              params:
                segments:
                  - 23
            action: vacuum.send_command
      - conditions:
          - condition: template
            value_template: "{{ wait.trigger.event.data.action == 'room_1' }}"
        sequence:
          - target:
              entity_id: vacuum.<vacuum_name>
            data:
              command: app_segment_clean
              params:
                segments:
                  - 21
            action: vacuum.send_command
      - conditions:
          - condition: template
            value_template: "{{ wait.trigger.event.data.action == 'open_areas' }}"
        sequence:
          - target:
              entity_id: vacuum.<vacuum_name>
            data:
              command: app_segment_clean
              params:
                segments:
                  - 16
                  - 17
                  - 23
                  - 24
            action: vacuum.send_command
      - conditions:
          - condition: template
            value_template: "{{ wait.trigger.event.data.action == 'entire_house' }}"
        sequence:
          - target:
              entity_id: vacuum.<vacuum_name>
            data:
              command: app_segment_clean
              params:
                segments:
                  - 16
                  - 17
                  - 18
                  - 19
                  - 20
                  - 21
                  - 22
                  - 23
                  - 24
                  - 26
            action: vacuum.send_command
mode: single

What does the automation’s trace show?

Step details:

Executed: January 8, 2025 at 7:08:31 PM
Result:
params:
  domain: notify
  service: mobile_app_drews_iphone
  service_data:
    message: Which rooms would you like Roxy to clean?
    title: Auto Cleaning
    data:
      actions:
        - action: family_room
          title: Family Room
        - action: kitchen
          title: Kitchen
        - action: living_room
          title: Living Room
        - action: hall
          title: Hall
        - action: drews_room
          title: Drew's Room
        - action: open_areas
          title: Open Areas
        - action: entire_house
          title: Entire House
        - action: skip_cleaning
          title: Skip Cleaning
  target: {}
running_script: false

Step Config:

data:
  message: Which rooms would you like Roxy to clean?
  title: Auto Cleaning
  data:
    actions:
      - action: family_room
        title: Family Room
      - action: kitchen
        title: Kitchen
      - action: living_room
        title: Living Room
      - action: hall
        title: Hall
      - action: drews_room
        title: Drew's Room
      - action: open_areas
        title: Open Areas
      - action: entire_house
        title: Entire House
      - action: skip_cleaning
        title: Skip Cleaning
action: notify.mobile_app_drews_iphone