Skip to content

Commit 34f46c3

Browse files
Log error when source entity is removed in calendar_event integration
1 parent 08aa87d commit 34f46c3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

custom_components/calendar_event/__init__.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,11 @@ def set_source_entity_id_or_uuid(source_entity_id: str) -> None:
6868
)
6969

7070
async def source_entity_removed() -> None:
71-
# The source entity has been removed, we remove the config entry because
72-
# calendar_event does not allow replacing the wrapped entity.
73-
await hass.config_entries.async_remove(entry.entry_id)
71+
# The source entity has been removed.
72+
LOGGER.error(
73+
"Failed to setup calender_event for unknown entity %s",
74+
entry.options[CONF_CALENDAR_ENTITY_ID],
75+
)
7476

7577
entry.async_on_unload(
7678
async_handle_source_entity_changes(

0 commit comments

Comments
 (0)