Garage door (gate) opener with status of the door (Fibaro opener) - for Apple Homekit

Hi.
I was having difficulties to get the garage door opener with status of the door. Went thru several topcis, but haven’t found complete solution in the forum, so had to find my own one.
This is how I did it and it works perfectly with Apple Homekit and with carplay as well!

cover:
  - platform: template
    covers:
      garazs_garazskapu_nyito_szenzorral:
        device_class: garage
        friendly_name: "Garage door with state"
        value_template: "{{is_state('binary_sensor.unknown_85_0_215', 'on')}}"
        open_cover:
          service: cover.toggle
          entity_id: cover.garazs_garazskapu_nyito
        close_cover:
          service: cover.toggle
          entity_id: cover.garazs_garazskapu_nyito
        icon_template: >-
          {% if is_state('binary_sensor.unknown_85_0_215', 'on') %}
          mdi:garage-open-variant
          {% else %}
          mdi:garage-variant-lock
          {% endif %}

Hi!
I am struggling with this a bit. Could you please share your customize.yaml file content related to this and the homekit include.entities: part?
I have a device that controls the gate switch. It is visible in HA as switch.my_garage_door_name
How do I go from that to a switch recognizeble by Homekit as a garage door?

My customize.yaml looks like this:

cover.garage_door:  
  device_class: garage

My configuration.yaml like this, where my original switch’s name is: switch.garage_gate_ha

cover:
  - platform: template
    covers:
      garage_door:
        device_class: garage
        friendly_name: "Garage Door HA"
        value_template: "{{ is_state('binary_sensor.garage_gate', 'on') }}"
        open_cover:
          service: switch.turn_on
          entity_id: switch.garage_gate_ha
        close_cover:
          service: switch.turn_on
          entity_id: switch.garage_gate_ha
        stop_cover:
          service: switch.turn_on
          entity_id: switch.garage_gate_ha
        icon_template: >-
          {% if states('binary_sensor.garage_door')|float > 0 %}
            mdi:garage-open
          {% else %}
            mdi:garage
          {% endif %}

It looks like there is no connection between my customize.yaml and the configuration.yaml