Cover no longer being created

Just recently I started to change my MQTT settings based on the message warnings about MQTT.

One of the messages was about my cover. So I editd it based on another post I made about how to do it.

Now I noticed that my cover.garage is no longer working and I do not know why.
Can some one explain. Below are the old and new yaml.

OLD

#cover:
- platform: mqtt
  name: "Garage Door"
  command_topic: "cmnd/GarageDoor/POWER"
  state_topic: "stat/GarageDoor/status"
  availability_topic: "tele/GarageDoor/LWT"
  qos: 1
  payload_available: "Online"
  payload_not_available: "Offline"
  payload_open: "ON"
  payload_close: "ON"
  payload_stop: "ON"
  state_open: "open"
  state_closed: "closed"
  device_class: garage

NEW

#cover:
mqtt:
  - name: "Garage Door"
    command_topic: "cmnd/GarageDoor/POWER"
    state_topic: "stat/GarageDoor/status"
    availability:
      - topic: "tele/GarageDoor/LWT"    
        payload_available: "Online"
        payload_not_available: "Offline"
        payload_open: "ON"
        payload_close: "ON"
        payload_stop: "ON"
    state_open: "open"
    state_closed: "closed"
    qos: 1  
    device_class: garage

Thanks for any help.

I think it’s just an indentation problem. You have all your payloads under the availability block. Try this:

mqtt:
  - name: "Garage Door"
    command_topic: "cmnd/GarageDoor/POWER"
    state_topic: "stat/GarageDoor/status"
    availability:
      - topic: "tele/GarageDoor/LWT"    
    payload_available: "Online"
    payload_not_available: "Offline"
    payload_open: "ON"
    payload_close: "ON"
    payload_stop: "ON"
    state_open: "open"
    state_closed: "closed"
    qos: 1  
    device_class: garage

Thank you for the reply.
I changed it to what you suggested, but my cover is still not showing up.
There has to be another reason and I am going to have to take a deep dive to find it.

I originally followed Digiblurs video on using a shelly to set it up. It had been showing up on my dashboard until recently. The garage door still works, but do not know why the cover is not there.
Again thank you for the help.

Is it in the Settings → Devices & Services → Entities list?

There is no cover.garagedoor in the list.

With the name you have given it the entity id would be cover.garage_door

Try this:

mqtt:
  cover:
    - name: "Garage Door"
      command_topic: "cmnd/GarageDoor/POWER"
      state_topic: "stat/GarageDoor/status"
      availability_topic: "tele/GarageDoor/LWT"    
      payload_available: "Online"
      payload_not_available: "Offline"
      payload_open: "ON"
      payload_close: "ON"
      payload_stop: "ON"
      state_open: "open"
      state_closed: "closed"
      qos: 1  
      device_class: garage

Again thanks for the try. But still no go.
Your last reply should work based on the documentation at MQTT cover

They show the following…

# Example configuration.yaml entry
mqtt:
  cover:
    - name: "MQTT Cover"
      command_topic: "home-assistant/cover/set"
      state_topic: "home-assistant/cover/state"
      availability:
        - topic: "home-assistant/cover/availability"
      qos: 0
      retain: true
      payload_open: "OPEN"
      payload_close: "CLOSE"
      payload_stop: "STOP"
      state_open: "open"
      state_opening: "opening"
      state_closed: "closed"
      state_closing: "closing"
      payload_available: "online"
      payload_not_available: "offline"
      optimistic: false
      value_template: "{{ value.x }}"

Which should work.
To test it out I replaced the cover file with my old one and though I got a deprecated message the cover.garagedoor showed up. I then tried multiple variations of the above shown file, but it is still not working.
Anything else you might recommend.