Vacuum robot garage automation question

Hi everyone,

is the automation right.
I want the vacuum door to open automatically when the attribute status changes to returning home.

alias: Tür Roborock Stop
description: ''
trigger:
  - platform: template
    value_template: >-
      "{{ is_state_attr('vacuum.xiaomi_vacuum_cleaner', 'status', 'Returning
      home') }}"
condition: []
action:
  - type: turn_on
    device_id: 35e3a5f3c5559f46c3f0cbc75b404253
    entity_id: switch.switch_1
    domain: switch
  - delay:
      hours: 0
      minutes: 0
      seconds: 50
      milliseconds: 0
  - type: turn_on
    device_id: 35e3a5f3c5559f46c3f0cbc75b404253
    entity_id: switch.switch_2
    domain: switch
mode: single