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

dashboard: Fix online status when api is disabled (#5792)

This commit is contained in:
J. Nick Koston
2023-11-21 01:16:06 +01:00
committed by GitHub
parent d5d97c4558
commit 7d5ebeda52
2 changed files with 20 additions and 3 deletions

View File

@@ -169,7 +169,9 @@ class DashboardImportDiscovery:
def _make_host_resolver(host: str) -> HostResolver:
"""Create a new HostResolver for the given host name."""
name = host.partition(".")[0]
info = HostResolver(ESPHOME_SERVICE_TYPE, f"{name}.{ESPHOME_SERVICE_TYPE}")
info = HostResolver(
ESPHOME_SERVICE_TYPE, f"{name}.{ESPHOME_SERVICE_TYPE}", server=f"{name}.local."
)
return info