Shelly Input as Garage Door Cover Status

I’m sure that is easier than I’m making it but for some reason I’m not able to figure it out looking at many other forum posts.

I have two different shelly devices. One to sense the door position, and another to open/close the door. The script to open/close works correctly without issue. The problem is that I’m attempting to make a cover for the door position but am having trouble getting a good reading.

# Garage Door Cover
cover:
  - platform: template
    covers:
      garage_door:
        device_class: garage
        friendly_name: "Garage Door"
        unique_id: "garage_door_yml_config"
        value_template: "{{ states('binary_sensor.plusi4_garageinput_input_0_input')}}"
        open_cover:
          action: script.cycle_garage
        close_cover:
          action: script.cycle_garage
        stop_cover:
          action: script.cycle_garage

Here is what I have so far, and from reading documentation it seems like I need to use value_template but can’t get it to show a status on the dashboard. Anyone have any ideas on what may be the correct config?

What events does your I4 deliver in HA and at what position?

So the sensor itself is simply an on/off state (read from a reed switch). When I configured the input as garage it translated to an open/close state.

The entity in its current configuration shows open/closed. Closed when the garage is closed, and open at all other times.

Or if this is clearer here is what I get in the logs for this entity with name GarageDoor_Status
gargedoor

However, you only get an open/closed status, i.e. no position in between.
Of course you still have the open/close switch, but it probably only gives a short impulse

I would first set the I4 to type cover, then you have the right icon in color

Can you show an example picture of how it should look?

Response above led me on a track with additional search terms where I finally found some other info that gave me my solution.

First Developer Tools → States is very hand to find the current state of entities, which I didn’t previously knew existed.

The final code that is currently working for my devices is:

# Garage Door Cover
cover:
  - platform: template
    covers:
      garage_door:
        device_class: garage
        friendly_name: "Garage Door"
        unique_id: "garage_door_yml_config"
        value_template: >
          {% if is_state('binary_sensor.plusi4_garageinput_input_0_input', 'off') %}
            false
          {% else %}
            true
          {% endif %}
        open_cover:
          action: script.cycle_garage
        close_cover:
          action: script.cycle_garage
        stop_cover:
          action: script.cycle_garage