1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-27 14:31:13 +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:
J. Nick Koston
2021-01-13 22:09:08 -10:00
committed by GitHub
parent 402a0ea7da
commit da677f7d5a
38 changed files with 843 additions and 17 deletions

View File

@@ -82,7 +82,7 @@ async def test_user_has_confirmation(hass, discovery_flow_conf):
assert result["type"] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY
@pytest.mark.parametrize("source", ["discovery", "mqtt", "ssdp", "zeroconf"])
@pytest.mark.parametrize("source", ["discovery", "mqtt", "ssdp", "zeroconf", "dhcp"])
async def test_discovery_single_instance(hass, discovery_flow_conf, source):
"""Test we not allow duplicates."""
flow = config_entries.HANDLERS["test"]()
@@ -96,7 +96,7 @@ async def test_discovery_single_instance(hass, discovery_flow_conf, source):
assert result["reason"] == "single_instance_allowed"
@pytest.mark.parametrize("source", ["discovery", "mqtt", "ssdp", "zeroconf"])
@pytest.mark.parametrize("source", ["discovery", "mqtt", "ssdp", "zeroconf", "dhcp"])
async def test_discovery_confirmation(hass, discovery_flow_conf, source):
"""Test we ask for confirmation via discovery."""
flow = config_entries.HANDLERS["test"]()