1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-11 07:42:26 +01:00

Fix dashboard ip resolving (#7747)

This commit is contained in:
Jesse Hills
2024-11-11 08:55:19 +13:00
committed by GitHub
parent 1829e68730
commit 335faf858b
3 changed files with 9 additions and 8 deletions

View File

@@ -320,12 +320,12 @@ class EsphomePortCommandWebSocket(EsphomeCommandWebSocket):
and "api" in entry.loaded_integrations
):
if (mdns := dashboard.mdns_status) and (
address := await mdns.async_resolve_host(entry.name)
address_list := await mdns.async_resolve_host(entry.name)
):
# Use the IP address if available but only
# if the API is loaded and the device is online
# since MQTT logging will not work otherwise
port = address
port = address_list[0]
elif (
entry.address
and (