1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-01 01:22:20 +01:00

[dashboard] Transfer DNS/mDNS cache from dashboard to CLI to avoid blocking (#10685)

This commit is contained in:
J. Nick Koston
2025-09-18 20:13:13 -05:00
committed by GitHub
parent 9853a2e6ab
commit 2bb64a189d
15 changed files with 1155 additions and 87 deletions

View File

@@ -311,10 +311,14 @@ def perform_ota(
def run_ota_impl_(
remote_host: str | list[str], remote_port: int, password: str, filename: str
) -> tuple[int, str | None]:
from esphome.core import CORE
# Handle both single host and list of hosts
try:
# Resolve all hosts at once for parallel DNS resolution
res = resolve_ip_address(remote_host, remote_port)
res = resolve_ip_address(
remote_host, remote_port, address_cache=CORE.address_cache
)
except EsphomeError as err:
_LOGGER.error(
"Error resolving IP address of %s. Is it connected to WiFi?",