From ed5fc43d1b1938f86a675f8a4c32790ef4e8197f Mon Sep 17 00:00:00 2001 From: JonReed Date: Fri, 20 Sep 2024 11:19:20 +0100 Subject: [PATCH] Added uid to events added to calendar (#2710) * Added uid to events added to calendar uid was missing from events being added to the local calendar. This leads to other systems (eg. Google calendar) not being able to import the calendar due to all events having the same uid of 'None' * reformatting --------- Co-authored-by: 5ila5 <5ila5@users.noreply.github.com> --- custom_components/waste_collection_schedule/calendar.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/custom_components/waste_collection_schedule/calendar.py b/custom_components/waste_collection_schedule/calendar.py index a7c0a7de..137d1180 100644 --- a/custom_components/waste_collection_schedule/calendar.py +++ b/custom_components/waste_collection_schedule/calendar.py @@ -1,6 +1,7 @@ """Calendar platform support for Waste Collection Schedule.""" import logging +import uuid from datetime import datetime, timedelta from homeassistant.components.calendar import CalendarEntity, CalendarEvent @@ -107,6 +108,7 @@ class WasteCollectionCalendar(CalendarEntity): summary=collection.type, start=collection.date, end=collection.date + timedelta(days=1), + uid=uuid.uuid4(), )