1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-02 19:32:19 +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

@@ -176,7 +176,7 @@ def _make_host_resolver(host: str) -> HostResolver:
class EsphomeZeroconf(Zeroconf):
def resolve_host(self, host: str, timeout: float = 3.0) -> str | None:
def resolve_host(self, host: str, timeout: float = 3.0) -> list[str] | None:
"""Resolve a host name to an IP address."""
info = _make_host_resolver(host)
if (
@@ -188,7 +188,9 @@ class EsphomeZeroconf(Zeroconf):
class AsyncEsphomeZeroconf(AsyncZeroconf):
async def async_resolve_host(self, host: str, timeout: float = 3.0) -> str | None:
async def async_resolve_host(
self, host: str, timeout: float = 3.0
) -> list[str] | None:
"""Resolve a host name to an IP address."""
info = _make_host_resolver(host)
if (