Cover Template for Garage Door - YAML Help Needed

Hi All,

So after all of the MyQ shenanigans I set out to recreate the functionality without dependence on Liftmaster. My solution was to take an extra garage door remote, solder on wires to the correct contacts (Main Garage door and the 2nd garage door) I then hooked those wires up to a Zooz Multirelay and was able to successfully trigger the garage doors. Next I followed the steps for the Cover Template and have it almost perfect but two requirements that I can’t seem to figure out.

  1. Switch off the up arrow or down arrow when pressed. For example, in the screenshot below if I push the up arrow to open the garage, I get no feedback that the command was accepted and is in progress. It’s only when the garage is all the way up and the tilt sensor is triggered after ~10 seconds that the state changes. How to solve for this?

  2. The stop button should only be active for the ~10 seconds that the garage is opening or closing. Since the command in the background is just essentially pushing the button on the door remote if the garage is up and you hit stop it actually opens the garage. It would be better if the button only activated while the garage was in motion. This could perhaps be time based. Maybe if I press the up arrow disable that button for 10 seconds and enable stop button? Coding for that is a little outside of my skill level though.


Here is the current YAML from my config

cover:
  - platform: template
    covers:
      garage_main:
        device_class: garage
        friendly_name: "Garage Main"
        value_template: "{{is_state('binary_sensor.garage_overhead_main', 'on')}}"
        open_cover:
          - condition: state
            entity_id: binary_sensor.garage_overhead_main
            state: "off"
          - service: switch.turn_on
            target:
              entity_id: switch.multirelay_2
        close_cover:
          - condition: state
            entity_id: binary_sensor.garage_overhead_main
            state: "on"
          - service: switch.turn_on
            target:
              entity_id: switch.multirelay_2
        stop_cover:
          service: switch.turn_on
          target:
            entity_id: switch.multirelay_2
        icon_template: >-
          {% if is_state('binary_sensor.garage_overhead_main', 'off') %}
            mdi:garage
          {% else %}
            mdi:garage-open
          {% endif %}
      garage_2:
        device_class: garage
        friendly_name: "Garage Two"
        value_template: "{{is_state('binary_sensor.garage_overhead_2', 'on')}}"
        open_cover:
          - condition: state
            entity_id: binary_sensor.garage_overhead_2
            state: "off"
          - service: switch.turn_on
            target:
              entity_id: switch.multirelay_3
        close_cover:
          - condition: state
            entity_id: binary_sensor.garage_overhead_2
            state: "on"
          - service: switch.turn_on
            target:
              entity_id: switch.multirelay_3
        stop_cover:
          service: switch.turn_on
          target:
            entity_id: switch.multirelay_3
        icon_template: >-
          {% if is_state('binary_sensor.garage_overhead_2', 'off') %}
            mdi:garage
          {% else %}
            mdi:garage-open
          {% endif %}

Okay so I tried adding an input boolean that would be triggered on or off based on a timer after hitting the up or down button but when I use this code nothing works. The buttons under the cover entity don’t trigger the relay or disable the buttons like I want. Any ideas?

input_boolean:
  garage_main_stop_active:
    initial: off
  garage_2_stop_active:
    initial: off

script:
  garage_main_stop:
    sequence:
      - service: switch.turn_off
        target:
          entity_id: switch.multirelay_2
      - delay: '00:00:10'
      - service: input_boolean.turn_off
        target:
          entity_id: input_boolean.garage_main_stop_active

# cover configuration sections

cover:
  - platform: template
    covers:
      garage_main:
        device_class: garage
        friendly_name: "Garage Main"
        value_template: "{{ is_state('binary_sensor.garage_overhead_main', 'on') }}"
        open_cover:
          - condition: state
            entity_id: binary_sensor.garage_overhead_main
            state: "off"
          - service: switch.turn_on
            target:
              entity_id: switch.multirelay_2
          - delay: '00:00:10'
          - service: input_boolean.turn_off
            target:
              entity_id: input_boolean.garage_main_stop_active
        close_cover:
          - condition: state
            entity_id: binary_sensor.garage_overhead_main
            state: "on"
          - service: switch.turn_on
            target:
              entity_id: switch.multirelay_2
          - delay: '00:00:10'
          - service: input_boolean.turn_off
            target:
              entity_id: input_boolean.garage_main_stop_active
        stop_cover:
          - service: script.garage_main_stop
        icon_template: >-
          {% if is_state('binary_sensor.garage_overhead_main', 'off') %}
            mdi:garage
          {% else %}
            mdi:garage-open
          {% endif %}