diff --git a/homeassistant/components/remote_calendar/calendar.py b/homeassistant/components/remote_calendar/calendar.py index 30cdd57e303b..a5bfbab09546 100644 --- a/homeassistant/components/remote_calendar/calendar.py +++ b/homeassistant/components/remote_calendar/calendar.py @@ -39,7 +39,7 @@ async def async_setup_entry( """Set up the remote calendar platform.""" coordinator = entry.runtime_data entity = RemoteCalendarEntity(coordinator, entry) - async_add_entities([entity], True) + async_add_entities([entity]) class RemoteCalendarEntity( diff --git a/tests/components/remote_calendar/test_init.py b/tests/components/remote_calendar/test_init.py index e1a14f9eca2f..0acfe5d15997 100644 --- a/tests/components/remote_calendar/test_init.py +++ b/tests/components/remote_calendar/test_init.py @@ -26,7 +26,7 @@ async def test_load_unload( hass: HomeAssistant, config_entry: MockConfigEntry, ics_content: str ) -> None: """Test loading and unloading a config entry.""" - respx.get(CALENDER_URL).mock( + route = respx.get(CALENDER_URL).mock( return_value=Response( status_code=200, text=ics_content, @@ -34,6 +34,8 @@ async def test_load_unload( ) await setup_integration(hass, config_entry) assert config_entry.state is ConfigEntryState.LOADED + # the calendar is downloaded and parsed once for the whole setup + assert route.call_count == 1 state = hass.states.get(TEST_ENTITY) assert state