Home Assistant Unofficial Reference
2024.12.1
models.py
Go to the documentation of this file.
1
"""Models for Zeroconf."""
2
3
from
zeroconf
import
Zeroconf
4
from
zeroconf.asyncio
import
AsyncZeroconf
5
6
7
class
HaZeroconf
(Zeroconf):
8
"""Zeroconf that cannot be closed."""
9
10
def
close
(self) -> None:
11
"""Fake method to avoid integrations closing it."""
12
13
ha_close = Zeroconf.close
14
15
16
class
HaAsyncZeroconf
(AsyncZeroconf):
17
"""Home Assistant version of AsyncZeroconf."""
18
19
async
def
async_close
(self) -> None:
20
"""Fake method to avoid integrations closing it."""
21
22
ha_async_close = AsyncZeroconf.async_close
homeassistant.components.zeroconf.models.HaAsyncZeroconf
Definition:
models.py:16
homeassistant.components.zeroconf.models.HaAsyncZeroconf.async_close
None async_close(self)
Definition:
models.py:19
homeassistant.components.zeroconf.models.HaZeroconf
Definition:
models.py:7
homeassistant.components.zeroconf.models.HaZeroconf.close
None close(self)
Definition:
models.py:10
core
homeassistant
components
zeroconf
models.py
Generated by
1.9.1