diff --git a/homeassistant/components/remote_calendar/coordinator.py b/homeassistant/components/remote_calendar/coordinator.py index da8f2847f8c4..3781c80046ef 100644 --- a/homeassistant/components/remote_calendar/coordinator.py +++ b/homeassistant/components/remote_calendar/coordinator.py @@ -80,5 +80,4 @@ class RemoteCalendarDataUpdateCoordinator(DataUpdateCoordinator[Calendar]): raise UpdateFailed( translation_domain=DOMAIN, translation_key="unable_to_parse", - translation_placeholders={"err": str(err)}, ) from err diff --git a/homeassistant/components/remote_calendar/ics.py b/homeassistant/components/remote_calendar/ics.py index d0920d7ae320..9ca987d5646c 100644 --- a/homeassistant/components/remote_calendar/ics.py +++ b/homeassistant/components/remote_calendar/ics.py @@ -39,6 +39,6 @@ async def parse_calendar(hass: HomeAssistant, ics: str) -> Calendar: try: return await hass.async_add_executor_job(_compat_calendar_from_ics, ics) except CalendarParseError as err: - _LOGGER.error("Error parsing calendar information: %s", err.message) + _LOGGER.error("The remote calendar feed contains invalid data: %s", err.message) _LOGGER.debug("Additional calendar error detail: %s", str(err.detailed_error)) raise InvalidIcsException(err.message) from err diff --git a/homeassistant/components/remote_calendar/strings.json b/homeassistant/components/remote_calendar/strings.json index 61faf1d44c17..5771d9eefbbb 100644 --- a/homeassistant/components/remote_calendar/strings.json +++ b/homeassistant/components/remote_calendar/strings.json @@ -9,7 +9,7 @@ "cannot_connect": "[%key:common::config_flow::error::cannot_connect%]", "forbidden": "The server understood the request but refuses to authorize it.", "invalid_auth": "[%key:common::config_flow::error::invalid_auth%]", - "invalid_ics_file": "There was a problem reading the calendar information. See the error log for additional details.", + "invalid_ics_file": "The remote calendar feed contains invalid data. See the error log for additional details.", "timeout_connect": "[%key:common::config_flow::error::timeout_connect%]" }, "step": { @@ -47,7 +47,7 @@ "message": "Unable to fetch calendar data. See the debug log for additional details." }, "unable_to_parse": { - "message": "Unable to parse calendar data: {err}" + "message": "The remote calendar feed contains invalid data. See the error log for additional details." } }, "title": "Remote Calendar" diff --git a/tests/components/remote_calendar/test_init.py b/tests/components/remote_calendar/test_init.py index 02fd1355b3dd..e1a14f9eca2f 100644 --- a/tests/components/remote_calendar/test_init.py +++ b/tests/components/remote_calendar/test_init.py @@ -85,6 +85,7 @@ async def test_update_failed( async def test_calendar_parse_error( hass: HomeAssistant, config_entry: MockConfigEntry, + caplog: pytest.LogCaptureFixture, ) -> None: """Test CalendarParseError using respx.""" respx.get(CALENDER_URL).mock( @@ -92,6 +93,7 @@ async def test_calendar_parse_error( ) await setup_integration(hass, config_entry) assert config_entry.state is ConfigEntryState.SETUP_RETRY + assert "The remote calendar feed contains invalid data:" in caplog.text @respx.mock