mirror of
https://github.com/sascha-hemi/hacs_waste_collection_schedule.git
synced 2026-03-21 02:04:22 +01:00
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>
This commit is contained in:
@@ -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(),
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user