ESPHOME 'default' config filename?

I’ve deployed a fresh version of ESPHome using Docker;

  automation-esphome:
    image: esphome/esphome:latest
    container_name: automation-esphome
    restart: unless-stopped
    environment:
      - TZ=Europe/Amsterdam
    networks:
      XXX:
        ipv4_address: 192.168.1.XXX
    ports:
      - 6052:6052
      - 6123:6123
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /data/docker/automation/esphome/config:/config

After trying to setup the integration in home assistant it complains with:

Can’t connect to ESP. Please make sure your YAML file contains an ‘api:’ line.

I know i have to add the API part to the config of ESPHome but i don’t know in which file(name).yaml… because, the ‘config’ directory is empty…

Remove or comment section network and ports.
Add line your docker-compose:
network_mode: host

Unfortunately that doesn’t work. I have home assistant running behind a reverse proxy and therefore i need to have at least for home assistant a “network” block. With that setup (HA with local IP and on traefik and ESPHome on network_mode: host) it doesn’t work.

Sorry, I must’ve misunderstod your question, could you elaborate more?

Yaml files for ESPHome devices are created upon clicking new device on the ipv4 adress (192.168.1.XXX:6052). They should appear in the /data/docker/automation/esphome/config directory right after. The api should be there automatically.