diff --git a/tests/components/devolo_home_network/__init__.py b/tests/components/devolo_home_network/__init__.py index b9026d8453b..913193be3f7 100644 --- a/tests/components/devolo_home_network/__init__.py +++ b/tests/components/devolo_home_network/__init__.py @@ -1,5 +1,6 @@ """Tests for the devolo Home Network integration.""" +import dataclasses from typing import Any from devolo_plc_api.device_api.deviceapi import DeviceApi @@ -27,5 +28,5 @@ def configure_integration(hass: HomeAssistant) -> MockConfigEntry: async def async_connect(self, session_instance: Any = None): """Give a mocked device the needed properties.""" - self.plcnet = PlcNetApi(IP, None, DISCOVERY_INFO) - self.device = DeviceApi(IP, None, DISCOVERY_INFO) + self.plcnet = PlcNetApi(IP, None, dataclasses.asdict(DISCOVERY_INFO)) + self.device = DeviceApi(IP, None, dataclasses.asdict(DISCOVERY_INFO)) diff --git a/tests/components/devolo_home_network/conftest.py b/tests/components/devolo_home_network/conftest.py index 255a9ec1f7c..1d8d2a6da19 100644 --- a/tests/components/devolo_home_network/conftest.py +++ b/tests/components/devolo_home_network/conftest.py @@ -30,8 +30,8 @@ def mock_device(): def mock_validate_input(): """Mock setup entry and user input.""" info = { - "serial_number": DISCOVERY_INFO["properties"]["SN"], - "title": DISCOVERY_INFO["properties"]["Product"], + "serial_number": DISCOVERY_INFO.properties["SN"], + "title": DISCOVERY_INFO.properties["Product"], } with patch( diff --git a/tests/components/devolo_home_network/test_config_flow.py b/tests/components/devolo_home_network/test_config_flow.py index 1af3c39bca2..7d115a26b15 100644 --- a/tests/components/devolo_home_network/test_config_flow.py +++ b/tests/components/devolo_home_network/test_config_flow.py @@ -99,7 +99,7 @@ async def test_zeroconf(hass: HomeAssistant): assert ( context["title_placeholders"][CONF_NAME] - == DISCOVERY_INFO["hostname"].split(".", maxsplit=1)[0] + == DISCOVERY_INFO.hostname.split(".", maxsplit=1)[0] ) with patch(