From 9fcf757021f6a7853b86ac36be32cd49a912505e Mon Sep 17 00:00:00 2001 From: G Johansson Date: Mon, 4 Nov 2024 19:35:35 +0100 Subject: [PATCH] Fix translations in landisgyr (#129831) --- .../components/landisgyr_heat_meter/strings.json | 3 +++ tests/components/landisgyr_heat_meter/test_config_flow.py | 8 -------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/homeassistant/components/landisgyr_heat_meter/strings.json b/homeassistant/components/landisgyr_heat_meter/strings.json index 4bae2490006..31f08ded79f 100644 --- a/homeassistant/components/landisgyr_heat_meter/strings.json +++ b/homeassistant/components/landisgyr_heat_meter/strings.json @@ -12,6 +12,9 @@ } } }, + "error": { + "cannot_connect": "[%key:common::config_flow::error::cannot_connect%]" + }, "abort": { "already_configured": "[%key:common::config_flow::abort::already_configured_device%]" } diff --git a/tests/components/landisgyr_heat_meter/test_config_flow.py b/tests/components/landisgyr_heat_meter/test_config_flow.py index 79088508e61..fe62d530719 100644 --- a/tests/components/landisgyr_heat_meter/test_config_flow.py +++ b/tests/components/landisgyr_heat_meter/test_config_flow.py @@ -101,10 +101,6 @@ async def test_list_entry(mock_port, mock_heat_meter, hass: HomeAssistant) -> No } -@pytest.mark.parametrize( # Remove when translations fixed - "ignore_translations", - ["component.landisgyr_heat_meter.config.error.cannot_connect"], -) @patch(API_HEAT_METER_SERVICE) async def test_manual_entry_fail(mock_heat_meter, hass: HomeAssistant) -> None: """Test manual entry fails.""" @@ -135,10 +131,6 @@ async def test_manual_entry_fail(mock_heat_meter, hass: HomeAssistant) -> None: assert result["errors"] == {"base": "cannot_connect"} -@pytest.mark.parametrize( # Remove when translations fixed - "ignore_translations", - ["component.landisgyr_heat_meter.config.error.cannot_connect"], -) @patch(API_HEAT_METER_SERVICE) @patch("serial.tools.list_ports.comports", return_value=[mock_serial_port()]) async def test_list_entry_fail(mock_port, mock_heat_meter, hass: HomeAssistant) -> None: