diff --git a/tests/components/kostal_plenticore/test_config_flow.py b/tests/components/kostal_plenticore/test_config_flow.py index 3c64a48c218..29695f57db6 100644 --- a/tests/components/kostal_plenticore/test_config_flow.py +++ b/tests/components/kostal_plenticore/test_config_flow.py @@ -25,12 +25,15 @@ async def test_formx(hass: HomeAssistant) -> None: ) as mock_api_class, patch( "homeassistant.components.kostal_plenticore.async_setup_entry", return_value=True, - ) as mock_setup_entry: + ) as mock_setup_entry, patch( + "homeassistant.components.kostal_plenticore.config_flow.get_hostname_id", + return_value="Network:Hostname", + ): # mock of the context manager instance mock_api_ctx = MagicMock() mock_api_ctx.login = AsyncMock() mock_api_ctx.get_setting_values = AsyncMock( - return_value={"scb:network": {"Hostname": "scb"}} + return_value={"scb:network": {"Network:Hostname": "scb"}} ) # mock of the return instance of ApiClient diff --git a/tests/components/kostal_plenticore/test_number.py b/tests/components/kostal_plenticore/test_number.py index beabd8fe669..7eca20d6f0f 100644 --- a/tests/components/kostal_plenticore/test_number.py +++ b/tests/components/kostal_plenticore/test_number.py @@ -62,7 +62,20 @@ def mock_get_setting_values(mock_plenticore_client: ApiClient) -> list: "id": "Battery:MinHomeComsumption", } ), - ] + ], + "scb:network": [ + SettingsData( + { + "id": "Network:Hostname", + "unit": None, + "type": "string", + "min": "1", + "max": "78", + "default": None, + "access": "readwrite", + } + ), + ], } # this values are always retrieved by the integration on startup @@ -75,7 +88,7 @@ def mock_get_setting_values(mock_plenticore_client: ApiClient) -> list: "Properties:VersionIOC": "01.45", "Properties:VersionMC": " 01.46", }, - "scb:network": {"Hostname": "scb"}, + "scb:network": {"Network:Hostname": "scb"}, } ]