Update zeroconf discovery to use IPAddress objects to avoid conversions (#100567)

This commit is contained in:
J. Nick Koston 2023-09-19 18:58:46 +02:00 committed by GitHub
parent 8dd3d6f989
commit 0eca433004
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
71 changed files with 575 additions and 462 deletions

View file

@ -1,4 +1,5 @@
"""Test the Netatmo config flow."""
from ipaddress import ip_address
from unittest.mock import patch
from pyatmo.const import ALL_SCOPES
@ -44,8 +45,8 @@ async def test_abort_if_existing_entry(hass: HomeAssistant) -> None:
"netatmo",
context={"source": config_entries.SOURCE_HOMEKIT},
data=zeroconf.ZeroconfServiceInfo(
host="0.0.0.0",
addresses=["0.0.0.0"],
ip_address=ip_address("192.168.1.5"),
ip_addresses=[ip_address("192.168.1.5")],
hostname="mock_hostname",
name="mock_name",
port=None,