Configuring a FS20z-1 for garage Door

Hello,

I have a LINEAR-FS20Z-1-Isolated-Contact-Fixture that i am trying to use as a cover for garage door.
I also have a Ecolink Tilt Sensor that i am trying to use.
I looked the old topics and got this configuration in my configuration.yaml.

``cover:

  • platform: template
    covers:
    car_door:
    friendly_name: “Garage Door”
    open_cover:
    service: switch.turn_on
    entity_id: script.garage_door_toggle
    close_cover:
    service: switch.turn_on
    entity_id: script.garage_door_toggle
    stop_cover:
    service: switch.turn_on
    entity_id: script.garage_door_toggle
    value_template: >
    {{ is_state(‘binary_sensor.ecolink_tilt_sensor_sensor’, ‘on’) }}
    icon_template: >
    {% if is_state(‘binary_sensor.ecolink_tilt_sensor_sensor’, ‘on’) %}
    mdi:garage-open
    {% else %}
    mdi:garage
    {% endif %}``

I also have a garage_door_toogle.yaml (Linear NGDZ00-4 Garage Door)

However the cover does not work. There is no response or logs.
Can someone help me with this.
Please point me to any example you may have.

Thanks

Can you format your code properly.

Thanks. Here is my cover.yaml.

  - platform: template
    covers:
      garagedoor:
        friendly_name: 'Garage Door'
        value_template: >
          {%- if states.binary_sensor.ecolink_tilt_sensor_sensor -%}
            {{ states.binary_sensor.ecolink_tilt_sensor_sensor.state == 'on' }}
          {%- else -%}
            true
          {%- endif -%}
        open_cover:
          service: switch.turn_on
          entity_id: switch.garage_relay
        close_cover:
          service: switch.turn_on
          entity_id: switch.garage_relay
        stop_cover:
          service: switch.turn_on
          entity_id: switch.garage_relay
        icon_template: >
          {%- if states.binary_sensor.ecolink_tilt_sensor_sensor.state == 'on' -%}
            mdi:garage-open
          {%- else -%}
            mdi:garage
          {%- endif -%}

I have included this thru configuration.yaml with

cover: !include cover.yaml

Thanks

I was able to figure out. Thanks