Files
project-work/home-assistant/homeassistant/components/zeroconf/models.py
2026-11-19 15:15:32 -05:00

23 lines
535 B
Python

"""Models for Zeroconf."""
from zeroconf import Zeroconf
from zeroconf.asyncio import AsyncZeroconf
class HaZeroconf(Zeroconf):
"""Zeroconf that cannot be closed."""
def close(self) -> None:
"""Fake method to avoid integrations closing it."""
ha_close = Zeroconf.close
class HaAsyncZeroconf(AsyncZeroconf):
"""Home Assistant version of AsyncZeroconf."""
async def async_close(self) -> None:
"""Fake method to avoid integrations closing it."""
ha_async_close = AsyncZeroconf.async_close