From 9cf115a7526a51b8e951586f8b4488784afcf41c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Szczodrzy=C5=84ski?= Date: Fri, 8 Sep 2023 23:20:26 +0200 Subject: [PATCH] Fix dashboard download for ESP32 variants (#5355) --- esphome/dashboard/dashboard.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/esphome/dashboard/dashboard.py b/esphome/dashboard/dashboard.py index 0d6ec8dc13..cacd5e2db0 100644 --- a/esphome/dashboard/dashboard.py +++ b/esphome/dashboard/dashboard.py @@ -540,7 +540,10 @@ class DownloadListRequestHandler(BaseHandler): self.send_error(404) return - from esphome.components.esp32 import get_download_types as esp32_types + from esphome.components.esp32 import ( + get_download_types as esp32_types, + VARIANTS as ESP32_VARIANTS, + ) from esphome.components.esp8266 import get_download_types as esp8266_types from esphome.components.rp2040 import get_download_types as rp2040_types from esphome.components.libretiny import get_download_types as libretiny_types @@ -551,7 +554,7 @@ class DownloadListRequestHandler(BaseHandler): downloads = rp2040_types(storage_json) elif platform == const.PLATFORM_ESP8266: downloads = esp8266_types(storage_json) - elif platform == const.PLATFORM_ESP32: + elif platform.upper() in ESP32_VARIANTS: downloads = esp32_types(storage_json) elif platform == const.PLATFORM_BK72XX: downloads = libretiny_types(storage_json)