Cover Template for garage need help

My garage door is operated by a button. This means that both opening, closing, and stopping are done through this one button.

When the garage door is closed, I press the button and the garage door opens until it is fully open. If I then press the button again, the garage door closes until it is fully closed. If I press the button during opening or closing, the opening or closing is stopped. If the button is pressed again, the garage door is operated in the opposite direction. This means that if the garage door is currently opening and Stop is pressed, it will be closed again. If the garage door is currently closing and Stop is pressed, it will be opened again.

The button is connected to a Shelly Plus 1 with the ID 123456.

There is an addon installed on the Shelly Plus 1 with the ID 987654. This addon can detect whether the garage door is open or not.

I now need a Cover Template for this garage door in Home Assistant.

The current template looks as follows (does not work 100% perfectly):

  - platform: template
        friendly_name: "Garage Door Test 3"
        device_class: garage
        value_template: "{{ 'closed' if is_state('binary_sensor.987654', 'off') else 'open' }}"
          service: switch.turn_on
          entity_id: switch.123456
          service: switch.turn_on
          entity_id: switch.123456
value_template: "{{ is_state('binary_sensor.987654', 'on') }}"

Unfortunately this does not solve the problem. The sensor works as expected.

Great. Problem is solved then. :slight_smile:

What is your actual problem?

This tells us nothing:

What is not working?

Is the stop function missing?

You have not added it to your cover configuration.