ESP8266 OTA UPDATE over http or https

Hello.
few of my devices are running on another network, behind firewall, and sometimes needs to be modified.

I tried to create a https OTA update, buy finally i realized its almost impossible for me

i’ve found many “solutions” but none of them are compilable…
i followed the esphome docs, it seems unusable as well.

ota:
  - platform: esphome
    password: "password"
  - platform: http_request

http_request:
  useragent: esphome/device
  timeout: 10s
  verify_ssl: false 


button:
  - platform: template
    name: Firmware update
    on_press:
      then:
        - ota_http_request.flash:
            md5_url: http://example.com/firmware.md5
            url: http://example.com/firmware.bin
        - logger.log: "This message should be not displayed because the device reboots"

it says Unable to find action with the name ‘ota_http_request.flash’.
Is there any working solution ?

i forgot to mention i’m using the current stable esphome version and tried the 2025-5-0-dev as well

Looks like a typo in your YAML try the following, replacing underscore with dot so “ota.http_request.flash”

ota:
  - platform: esphome
    password: "password"
  - platform: http_request

http_request:
  useragent: esphome/device
  timeout: 10s
  verify_ssl: false 


button:
  - platform: template
    name: Firmware update
    on_press:
      then:
        - ota.http_request.flash:
            md5_url: http://example.com/firmware.md5
            url: http://example.com/firmware.bin
        - logger.log: "This message should be not displayed because the device reboots"