Entity error not found

Hello, I need help with this problem, after adding the sersor to show the state of the gate has started the entity error not found

Sem%20t%C3%ADtulo2

my code in configuration.yaml

Cover:

covers: 
  - 
    name: Portão
    relay_pin: 27
    state_pin: 22
invert_relay: false
invert_state: true
platform: rpi_gpio
relay_time: 2
state_pull_mode: DOWN

sensor:

platform: template
sensors: 
  garage_door: 
    friendly_name: "Portão ésta:"
    value_template: "{{ states.cover.portao.state }}"

switch:

platform: rpi_gpio
ports: 
  4: "Luz 127V"
  5: "Led Vermelho"
  6: "Led Verde"

That configuration is all sorts of wrong. Spacing and naming need to be exact. This is what it should look like.

cover: 
  - platform: rpi_gpio
    invert_relay: false
    invert_state: true
    relay_time: 2
    state_pull_mode: DOWN
    covers:
      - name: Portão
        relay_pin: 27
        state_pin: 22

Thank you for your attention, but the error still continues.

it probably has a new entity_id because the other has been registered. Take a look in your states page for a similarly named cover.

This is the only cover I have.

I believe the error is here:

sensor: 
  - 
    platform: template
    sensors: 
      garage_door: 
        friendly_name: "Portão ésta:"
        value_template: "{{states.cover.portao.state}}"