Compile and flash on ESP by script, not with ESPhome builder

Hello,
I’m trying to create an HA script to send an update to a simple esphome device (a temperature sensor on an ESP8266).
I want this to start compiling my YAML and then flash the ESP. (Update MY YAML file, not ESPhome.)
On the HA side, I’ve tried:

- action: update.install
target:
device_id: update.thermometer_firmware

without success …
I’m starting to think that the device should request its update via the esphome “update” component (Update Core — ESPHome), but I can’t find any examples. The documentation states:

# Example configuration entry
update:
- platform: ...

without further details. We see that there is an update.perform action, but how do I use it?
Any help would be welcome. Thank you.

Good evening,
39 views and no one has any ideas? It seemed like a simple question, even quite basic, but no, I asked the earth!
I just saw that “ESPhome Builder” can be manipulated from the command line, notably with “run.” It remains to be seen if a script can launch the command line…
Ultimately, all this seems more complicated than pure programming in C++ or Python.