Vizio: when checking new host against existing config entry hosts, make check hostname aware (#37397)

* make ip check hostname aware

* add executor job for sync function doing IO and remove errant comma

* revert change to update new_data explicitly for options keys since it is already done later

* empty commit to retrigger CI
This commit is contained in:
Raman Gupta authored and GitHub committed 2020-07-08 15:31:41 -04:00
1 parent 368116d242
commit 572d5a09cd
4 files changed
+84 -6

No files matched your search

+11
View File
@@ -16,6 +16,7 @@ from .const import (
RESPONSE_TOKEN,
UNIQUE_ID,
VERSION,
ZEROCONF_HOST,
MockCompletePairingResponse,
MockStartPairingResponse,
)
@@ -183,3 +184,13 @@ def vizio_update_with_apps_fixture(vizio_update: pytest.fixture):
return_value=CURRENT_APP_CONFIG,
):
yield
@pytest.fixture(name="vizio_hostname_check")
def vizio_hostname_check():
"""Mock vizio hostname resolution."""
with patch(
"homeassistant.components.vizio.config_flow.socket.gethostbyname",
return_value=ZEROCONF_HOST,
):
yield