diff --git a/esphome/dashboard/web_server.py b/esphome/dashboard/web_server.py index 4862102b7c..5086325f4c 100644 --- a/esphome/dashboard/web_server.py +++ b/esphome/dashboard/web_server.py @@ -277,8 +277,8 @@ class EsphomePortCommandWebSocket(EsphomeCommandWebSocket): if ( port == "OTA" and (mdns := dashboard.mdns_status) - and (host_name := entries.get(configuration)) - and (address := await mdns.async_resolve_host(host_name)) + and (entry := entries.get(config_file)) + and (address := await mdns.async_resolve_host(entry.name)) ): port = address