1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-29 06:04:01 +00:00

Add dashboard API to get firmware binaries (#4675)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
Kuba Szczodrzyński
2023-09-01 08:17:33 +02:00
committed by GitHub
parent f8a03be2f1
commit c3332e4a39
4 changed files with 94 additions and 25 deletions

View File

@@ -50,6 +50,17 @@ def set_core_data(config):
return config
def get_download_types(storage_json):
return [
{
"title": "Standard format",
"description": "For flashing ESP8266.",
"file": "firmware.bin",
"download": f"{storage_json.name}.bin",
},
]
def _format_framework_arduino_version(ver: cv.Version) -> str:
# format the given arduino (https://github.com/esp8266/Arduino/releases) version to
# a PIO platformio/framework-arduinoespressif8266 value