Virtual Garage Door Controller - can this code be put together?

Hey there… I have a zwave dry contact relay and a door sensor that I’ve been using on other platforms for a couple years. Now that I’m on HA, I was looking for some code that would make use of the relay and the open/closed contact.

Here is the URL with the code I found that I’m trying to use but I think it is incomplete: Options for Garage Door Opener?

This person said that Covers.yaml contains this:

  - platform: template
    covers:
      garage_door_backup:
        friendly_name: "Garage Door Backup"
        value_template: "{{ is_state('binary_sensor.d32_garage_door_main_sensor', 'on') }}"
        open_cover:
          service: script.garage_door_open_backup
        close_cover:
          service: script.garage_door_close_backup
        icon_template: >-
          {% if is_state('binary_sensor.d32_garage_door_main_sensor', 'on') %}
            mdi:garage-open
          {% else %}
            mdi:garage
          {% endif %

And this other file called Scripts.yaml contains this code:

garage_door_open_backup:
  alias: 'Garage Door Open'
  sequence:
    - service: script.garage_notify
    - condition: state
      entity_id: input_boolean.mode_armed
      state: 'off'
    - service: switch.turn_on
      entity_id: switch.d12_garage_door_switch
    - delay: 00:00:03
    - service: switch.turn_off
      entity_id: switch.d12_garage_door_switch
    - delay: 00:00:30
    - condition: state
      entity_id: binary_sensor.d32_garage_door_main_sensor
      state: 'off'
    - service: notify.gregg_pushover
      data:
        title: 'Garage Door Failure'
        message: 'The Garage Door did not open or there is an issue with a sensor'

garage_door_close_backup:
  alias: 'Garage Door Close'
  sequence:
    - service: switch.turn_on
      entity_id: switch.d12_garage_door_switch
    - delay: 00:00:03
    - service: switch.turn_off
      entity_id: switch.d12_garage_door_switch
    - delay: 00:00:30
    - condition: state
      entity_id: binary_sensor.d32_garage_door_main_sensor
      state: 'on'
    - service: notify.gregg_pushover
      data:
        title: 'Garage Door Failure'
        message: 'The Garage Door did not shut or there is an issue with a sensor'

garage_notify:
  alias: 'Garage Notify'
  sequence:
    - condition: state
      entity_id: input_boolean.mode_armed
      state: 'on'
    - service: notify.gregg_pushover
      data:
        title: 'The Alarm is On'
        message: 'Cannot open the Garage Door while the Alarm is On'

Is there any way that I can combine the two and put them into a package so everything is together? I also don’t know what is missing - I think the template section is missing something but I don’t have enough experience with this code to know. Any info would be appreciated - or if there is another solution that just works with my type of setup, I’d open to using something else. Thanks in advance for any information anyone may have.

Thanks,

-Alli

I just responded to you in the other thread.