MQTT Changes 2022.9

Like almost everybody with the update to 2022.9 I am getting MQTT warnings.
I have read the documentation, but it confuses me further as to what must change.
If someone can explain how I would change this particular instance it might help me understand the new format.

This is what I currently have

binary_sensor:
  - platform: mqtt
    name: "Garage Door State"
    state_topic: "stat/GarageDoor/status"
    payload_on: "open"
    payload_off: "closed"
    # payload_on: "closed"
    # payload_off: "open"    
    availability_topic: "tele/GarageDoor/LWT"
    payload_available: "Online"
    payload_not_available: "Offline"
    qos: 1
    device_class: opening 

Would this be the new format?

mqtt:
  binary_sensor:
    - name: "Garage Door State"
      state_topic: "stat/GarageDoor/status"
      payload_on: "open"
      payload_off: "closed"
      # payload_on: "closed"
      # payload_off: "open"    
      availability_topic: "tele/GarageDoor/LWT"
      payload_available: "Online"
      payload_not_available: "Offline"
      qos: 1
      device_class: opening 

Thanks for the help

It’s untested, but as i understand the docs it must be:

mqtt:
  binary_sensor:
    - name: "Garage Door State"
      state_topic: "stat/GarageDoor/status"
      payload_on: "open"
      payload_off: "closed"
      # payload_on: "closed"
      # payload_off: "open"    
      availability:
        - topic: "tele/GarageDoor/LWT"
          payload_available: "Online"
          payload_not_available: "Offline"
      qos: 1
      device_class: opening
1 Like

Thanks will give it a try.