mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Add support for discovery via DHCP (#45087)
* Add support for discovery via DHCP * additional tesla ouis * merge tests * dhcp test * merge requirements test * dhcp test * dhcp discovery * dhcp discovery * pylint * pylint * pylint * fix * Add matching tests * 100% cover * cleanup * fix codespell * Update exception handling * remove unneeded comment * fix options handling exception * fix options handling exception
This commit is contained in:
@@ -48,6 +48,11 @@ def validate_integration(config: Config, integration: Integration):
|
||||
"config_flow",
|
||||
"Zeroconf information in a manifest requires a config flow to exist",
|
||||
)
|
||||
if integration.manifest.get("dhcp"):
|
||||
integration.add_error(
|
||||
"config_flow",
|
||||
"DHCP information in a manifest requires a config flow to exist",
|
||||
)
|
||||
return
|
||||
|
||||
config_flow = config_flow_file.read_text()
|
||||
@@ -59,6 +64,7 @@ def validate_integration(config: Config, integration: Integration):
|
||||
or "async_step_mqtt" in config_flow
|
||||
or "async_step_ssdp" in config_flow
|
||||
or "async_step_zeroconf" in config_flow
|
||||
or "async_step_dhcp" in config_flow
|
||||
)
|
||||
|
||||
if not needs_unique_id:
|
||||
@@ -100,6 +106,7 @@ def generate_and_validate(integrations: Dict[str, Integration], config: Config):
|
||||
or integration.manifest.get("mqtt")
|
||||
or integration.manifest.get("ssdp")
|
||||
or integration.manifest.get("zeroconf")
|
||||
or integration.manifest.get("dhcp")
|
||||
):
|
||||
continue
|
||||
|
||||
|
||||
Reference in New Issue
Block a user