Help with a flow? timeouts, waits

Can anyone take a stab at this automation > flow? Or better yet point me towards some of the nodes I should be using.

Thanks.

- alias: Send Message when no one is home but a door was opened v2
  trigger:
    - platform: state
      entity_id: binary_sensor.wink_garage_entry_opened, binary_sensor.wink_front_door_opened, binary_sensor.wink_back_door_opened, binary_sensor.wink_basement_door_opened, binary_sensor.front_door
      to: 'on'
  condition:
   condition: state
   entity_id: group.device_family
   state: 'not_home'
  action:
    - wait_template: >
       {% set new = trigger.entity_id %}
       {{ is_state(new, 'off') }}
      timeout: 00:00:05
    - service: notify.everyone_group
      data_template:
        title: Something happened at home
        message: >
          {% set new = trigger.entity_id %}
          {% if is_state(new, 'off') %}
            No one is home and {{ trigger.to_state.name }} was opened and closed.
          {% else %}
            No one is home and {{ trigger.to_state.name }} was opened.
          {% endif %}
    - condition: template
      value_template: >
        {% set new = trigger.entity_id %}
        {{ is_state(new, 'on') }}
    - wait_template: >
       {% set new = trigger.entity_id %}
       {{ is_state(new, 'off') }}
    - service: notify.everyone_group
      data_template:
       title: Something happened at home
       message: >
         No one is home and {{ trigger.to_state.name }} was closed

Here’s a mock up of how one might do the first half of the automation. The second half gets a little more complex.