Namespaces | |
| const | |
Classes | |
| class | DeviceTrackerRegisteredWatcher |
| class | DeviceTrackerWatcher |
| class | DhcpMatchers |
| class | DhcpServiceInfo |
| class | DHCPWatcher |
| class | NetworkWatcher |
| class | RediscoveryWatcher |
| class | WatcherBase |
Functions | |
| re.Pattern | _compile_fnmatch (str pattern) |
| bool | _memorized_fnmatch (str name, str pattern) |
| DhcpMatchers | async_index_integration_matchers (list[DHCPMatcher] integration_matchers) |
| bool | async_setup (HomeAssistant hass, ConfigType config) |
Variables | |
| _LOGGER = logging.getLogger(__name__) | |
| CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN) | |
| Final | |
| SCAN_INTERVAL = timedelta(minutes=60) | |
The dhcp integration.
|
private |
Compile a fnmatch pattern.
Definition at line 471 of file __init__.py.
|
private |
Memorized version of fnmatch that has a larger lru_cache. The default version of fnmatch only has a lru_cache of 256 entries. With many devices we quickly reach that limit and end up compiling the same pattern over and over again. DHCP has its own memorized fnmatch with its own lru_cache since the data is going to be relatively the same since the devices will not change frequently
Definition at line 477 of file __init__.py.
| DhcpMatchers homeassistant.components.dhcp.async_index_integration_matchers | ( | list[DHCPMatcher] | integration_matchers | ) |
Index the integration matchers. We have three types of matchers: 1. Registered devices 2. Devices with no OUI - index by first char of lower() hostname 3. Devices with OUI - index by OUI
Definition at line 95 of file __init__.py.
| bool homeassistant.components.dhcp.async_setup | ( | HomeAssistant | hass, |
| ConfigType | config | ||
| ) |
Set up the dhcp component.
Definition at line 130 of file __init__.py.
|
private |
Definition at line 74 of file __init__.py.
| homeassistant.components.dhcp.CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN) |
Definition at line 65 of file __init__.py.
| homeassistant.components.dhcp.Final |
Definition at line 67 of file __init__.py.
| homeassistant.components.dhcp.SCAN_INTERVAL = timedelta(minutes=60) |
Definition at line 71 of file __init__.py.