OTA File Error

Attempting to apply firmware maintenance to an Athom presence sensor, all appears successful until it tries to perform the update, then get these messages:
INFO Successfully compiled program.
INFO Connecting to 192.168.0.108 port 8266…
INFO Connected to 192.168.0.108
INFO Uploading /data/build/athom-presence-sensor-9cec71/.pioenvs/athom-presence-sensor-9cec71/firmware.bin (620592 bytes)
INFO Compressed to 421858 bytes
ERROR Error binary size: Error: ESP does not have enough space to store OTA file. Please try flashing a minimal firmware (remove everything except ota)

Can anyone point me to a method to perform the flashing with minimal firmware?

Create a minimal YAML file & use it to flash sensor.

Me using something like this:

esphome:
  name: xxx-name
esp8266:
  board: esp8285
ota:
  platform: esphome
  password: !secret ota_password
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

with mentioned passwords in secrets.yaml.

As well You can try to remove some components from Your YAML, like web_server, ap, …