mampfes / hacs_waste_collection_schedule

Home Assistant integration framework for (garbage collection) schedules
MIT License
988 stars 631 forks source link

Can't get my .ics format to work #177

Closed domi877 closed 2 years ago

domi877 commented 2 years ago

Hey, My city has a strange .ics format and I can't integrate it into the scheduler. The .ics looks as following:

BEGIN:VCALENDAR
PRODID:-//Google Inc//Google Calendar 70.9054//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:PUBLISH
X-WR-CALNAME:Abfallkalender Papiertonne - PPK 4
X-WR-TIMEZONE:Europe/Berlin
X-WR-CALDESC:Abfallkalender Papiertonne der Stadt Wächtersbach
BEGIN:VEVENT
DTSTART;VALUE=DATE:20221215
DTEND;VALUE=DATE:20221216
DTSTAMP:20220313T125704Z
UID:u81v31qqqtb8vsqnkbssa99cdv@google.com
RECURRENCE-ID;VALUE=DATE:20221222
CREATED:20211201T094259Z
LAST-MODIFIED:20211201T103736Z
LOCATION:
SEQUENCE:2
STATUS:CONFIRMED
SUMMARY:PPK 4
TRANSP:TRANSPARENT
END:VEVENT
BEGIN:VEVENT
DTSTART;VALUE=DATE:20220608
DTEND;VALUE=DATE:20220609
DTSTAMP:20220313T125704Z
UID:u81v31qqqtb8vsqnkbssa99cdv@google.com
RECURRENCE-ID;VALUE=DATE:20220609
CREATED:20211201T094259Z
LAST-MODIFIED:20211201T101513Z
LOCATION:
SEQUENCE:2
STATUS:CONFIRMED
SUMMARY:PPK 4
TRANSP:TRANSPARENT
END:VEVENT
BEGIN:VEVENT
DTSTART;VALUE=DATE:20220512
DTEND;VALUE=DATE:20220513
RRULE:FREQ=WEEKLY;WKST=MO;UNTIL=20221231;INTERVAL=4;BYDAY=TH
DTSTAMP:20220313T125704Z
UID:u81v31qqqtb8vsqnkbssa99cdv@google.com
CREATED:20211201T094259Z
LAST-MODIFIED:20211201T101345Z
LOCATION:
SEQUENCE:1
STATUS:CONFIRMED
SUMMARY:PPK 4
TRANSP:TRANSPARENT
END:VEVENT
BEGIN:VEVENT
DTSTART;VALUE=DATE:20220120
DTEND;VALUE=DATE:20220121
RRULE:FREQ=WEEKLY;WKST=MO;UNTIL=20220511;INTERVAL=4;BYDAY=TH
DTSTAMP:20220313T125704Z
UID:4clsfh6tm7tca6ph618pvi096j@google.com
CREATED:20211201T094259Z
LAST-MODIFIED:20211201T101345Z
LOCATION:
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:PPK 4
TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR

My configuration looks like this:

waste_collection_schedule:
  sources:
    - name: muell_ics
      args:
        file: "www/muell.ics"
        version: 1
      customize:
        - type: PPK 4
          alias: papier_muell
          icon: mdi:trash-can
      calendar_title: Muell

I am not sure but I may think the DTSTART;VALUE=DATE: part may cause this problem. Do you have any idea how to set the parameters correct?

mampfes commented 2 years ago

It should work if you replace muell_icsby ics.

You can also use the url from the homepage directly (instead of a local file):

waste_collection_schedule:
  sources:
    - name: ics
      args:
        url: "https://calendar.google.com/calendar/ical/bfi1mvm15hj9ieh6o42argbiuk%40group.calendar.google.com/public/basic.ics"
     customize:
       - type: PPK 4
         alias: papier_muell
         icon: mdi:trash-can
domi877 commented 2 years ago

That one worked, thank you!