Thanks! That seemed to fix it. I appreciate your help.
Hi Kabala,
please find my code I use in my config:
Müllabfuhr Informationen
waste_collection_schedule:
sources:
- name: abfallnavi_de
args:
service: nuernberg
ort: Nürnberg
strasse: xyzstrasse
hausnummer: 00
customize:
- type: Restabfall
alias: Restmüll
show: true
icon: mdi:delete-empty
picture: none
- type: Bioabfall
alias: Kompost
show: true
icon: mdi:compost
picture: none
- type: Papiertonne
alias: Altpapier
show: true
icon: mdi:recycle
picture: none
- type: "Papiertonne 1100" #The identity of the waste type as returned from the source
show: false #Show (True) or hide collections of this specific waste type.
- type: Gelbe Tonne
alias: Wertstofftonne
show: true
icon: mdi:recycle-variant
picture: none
fetch_time: "05:47"
random_fetch_time_offset: 35
day_switch_time: "13:30"
separator: SEPARATOR
hope this helps you.
Thanks for your reply. I did not use the calendar before. Created a new calendar but there are no entries. Will Look into this again tomorrow. Any hints welcome.
My uneducated guess is that nothing showed up because the calendar integration was not installed. I failed to unistall and reinstall but found another integration which does the work. Hence, this can be closed, it seemed that I messed the installation up. For me this is fixed but if it is of interest I can test to uninstall and reinstall. Would need someone to tell me how though. Otherwise my request can be closed. @Mampfes: Amazing project and thank you for the hint to the calendar.
@Paluty The HA calendar is available via the menu on the left side. You don’t have to install an integration for that.
This seems to be working great although I’m not sure if I’m doing something wrong it seems to be integrated fine. However Garden Waste appears twice for United Kingdom/Newcastle Under Lyme council calendar, I know this is just the date that is pulled but is there a simple waste of removing the duplicate entry?
Hi, i didn’t find my location austria 4563 Micheldorf for a ics file and so i configured multiple static source in waste_collection.yaml. The problem is, when i put up more then one start intervall the sensor and calender doesn’t work.
here is the waste_collection.yaml
sources:
- name: static
calendar_title: Altpapier
args:
type: Altpapier
frequency: WEEKLY
interval: 4
start: "2023-01-11"
customize:
- type: Altpapier
icon: mdi:trash-can
- name: static
calendar_title: Biomuell
args:
type: Biomuell
frequency: WEEKLY
interval: 1
start: "2023-01-05"
customize:
- type: Biomuell
icon: mdi:flower-outline
- name: static
calendar_title: GelberSack
args:
type: GelberSack
frequency: WEEKLY
interval: 6
start: "2023-02-17"
weekdays: FR
customize:
- type: GelberSack
icon: mdi:recycle
- name: static
calendar_title: Restmuell
args:
type: Restmuell
frequency: WEEKLY
interval: 2
start: "2023-01-05"
customize:
- type: Restmuell
icon: mdi:trash-can
for the sensor, i have made a directory search and so it look’s like a bit diffrent to your original config
here i have made a global sensor:
platform: waste_collection_schedule
name: next_Muell
source_index: [0, 1, 2, 3]
details_format: "upcoming"
value_template: "{% if value.daysTo == 0 %}Heute{% elif value.daysTo == 1 %}Morgen{% else %}in {{value.daysTo}} Tagen{% endif %}"
and then the dedicated sensor’s
platform: waste_collection_schedule
name: Altpapier
source_index: 0
details_format: "upcoming"
value_template: "{% if value.daysTo == 0 %}Heute{% elif value.daysTo == 1 %}Morgen{% else %}in {{value.daysTo}} Tagen{% endif %}"
types:
- Altpapier
platform: waste_collection_schedule
name: Biomuell
source_index: 1
details_format: "upcoming"
value_template: "{% if value.daysTo == 0 %}Heute{% elif value.daysTo == 1 %}Morgen{% else %}in {{value.daysTo}} Tagen{% endif %}"
types:
- Biomuell
platform: waste_collection_schedule
name: GelberSack
source_index: 2
details_format: "upcoming"
value_template: "{% if value.daysTo == 0 %}Heute{% elif value.daysTo == 1 %}Morgen{% else %}in {{value.daysTo}} Tagen{% endif %}"
types:
- GelberSack
platform: waste_collection_schedule
name: Restmuell
source_index: 3
details_format: "upcoming"
value_template: "{% if value.daysTo == 0 %}Heute{% elif value.daysTo == 1 %}Morgen{% else %}in {{value.daysTo}} Tagen{% endif %}"
types:
- Restmuell
i made a complete restart from the system for the status:
restmuell: calendar off sensor: unknown
gelbersack: calendar off sensor: in 7 tagen
biomuell: calendar off sensor: unknown
altpapier: calendar off sensor: in 11 tagen
next_Muell: sensor in 6 Tagen with the data of waste paper and yellow sack
2023-06-23: GelberSack
2023-06-28: Altpapier
2023-07-26: Altpapier
2023-08-04: GelberSack
2023-08-23: Altpapier
2023-09-15: GelberSack
2023-09-20: Altpapier
2023-10-27: GelberSack
2023-12-08: GelberSack
2024-01-19: GelberSack
2024-03-01: GelberSack
attribution: Last update: 06/16/23 23:44:45
icon: mdi:recycle
friendly_name: next_Muell
can you help me out with this config problem. i think it is a bug because i have also tryed the config from Bill Schatzow, this is working.
You may also want to ask @amaxims the code owner of the garbage-collection-card. Not sure if your issue is coming from the waste collection integration or the front end card or your code. Hopefully someone can help you figure it out. @amaxims spotted my error after I spent many weeks of struggling to get it working. Good luck!
My service provider has changed the format of the ics file. Now multiple waste types are combined in one event entry:
BEGIN:VEVENT
UID:20230611T231127UTC-9972G9uEm2
DTSTAMP:20230611T231127Z
DESCRIPTION:Entsorgung: Hausmüllbehälter\, Gelber Sack\, Papierbehälter
DTSTART;TZID=Europe/Berlin:20231121T000000
DTEND;TZID=Europe/Berlin:20231121T005959
LOCATION:xyz
SUMMARY:Hausmüllbehälter\, Gelber Sack\, Papierbehälter
END:VEVENT
I was hoping that I can use the optional Separator parameter in this case:
waste_collection_schedule:
separator: '\, '
sources:
- name: ics
I have tried several different separator variants (with escaping and w/o, also editing a test ics file). None of them worked.
Does anyone have a comparable configuration? How did you solve the problem?
Hi, I need help with my sensors.
I got them working, but it is showing the day and date in English locale (and I want swedish).
I know I have to do something in the code to fix it but I am unsure what to add. It is currently showing for example “Mon den 10.7.2023” and I would like to change that to “Måndag den 10/7” or something similar. How would I go about doing this?
See code below:
sensor:
- platform: waste_collection_schedule
name: Sopor
value_template: '{% if value.daysTo == 0 %}Idag{% elif value.daysTo == 1 %}Imorgon{% elif value.daysTo < 3 %}om {{value.daysTo}} dagar{% else %} {{value.date.strftime("%a")}} den {{value.date.strftime("%d.%m.%Y")}} {% endif %}'
types:
- FNI Kärl 1
- platform: waste_collection_schedule
name: Återvinning
value_template: '{% if value.daysTo == 0 %}Idag{% elif value.daysTo == 1 %}Imorgon{% elif value.daysTo < 3 %}om {{value.daysTo}} dagar{% else %} {{value.date.strftime("%a")}} den {{value.date.strftime("%d.%m.%Y")}} {% endif %}'
types:
- FNI Kärl 2
Edit:
Solved with this code
sensor:
- platform: waste_collection_schedule
name: Sopor
value_template: >
{% set weekdays = ["Mån", "Tis", "Ons", "Tor", "Fre", "Lör", "Sön"] %}
{% if value.daysTo == 0 %}
Idag
{% elif value.daysTo == 1 %}
Imorgon
{% elif value.daysTo < 3 %}
om {{ value.daysTo }} dagar
{% else %}
{{ weekdays[value.date.weekday()] }} den {{ value.date.strftime("%d.%m.%Y") }}
{% endif %}
types:
- FNI Kärl 1
waste_collection_schedule:
sources:
- name: ics
args:
file: your-file-name.ics
split_at: '\, '
@aichingerk The problem is that you specified neither until
nor count
. Therefore it defaults to count=10
and for Biomuell and Restmuell the 10 events are already in the past and therefore not shown any more. So please specify either unitl
or count
- for every static source. If will add a comment in the documentation that makes this clearer.
Thx. i made it with count in each static entry and now it is working perfekt
See, right place - right answer! Honestly, I never would have thought about that.
I realy like this integration. I’ve moved to a new home and I get my schedules as an ics calendar. The problem is, that all schedules have tailing date eg
BEGIN:VEVENT
UID:64a1477c97932
DTSTART;TZID=Europe/Berlin:20230111T060000
DTEND;TZID=Europe/Berlin:20230111T080000
DTSTAMP:20230702T114636Z
CLASS:PUBLIC
DESCRIPTION:www.entsorgung-sad.de
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:Restmüll 11.01.2023
LOCATION:93133 Burglengenfeld Kiebitzweg
BEGIN:VALARM
TRIGGER:-PT720M
ACTION:DISPLAY
DESCRIPTION:Restmüll
END:VALARM
TRANSP:TRANSPARENT
END:VEVENT
BEGIN:VEVENT
how do i get rid of the tailing date without recreating the whole calendar?
@Per1962 You can remove superfluous text with the regex
argument of the ICS source. Let me know if this doesn’t work for you.
Thank you. That helped. Adding
- name: ics
args:
url: "..../basic.ics"
regex: '^([\w\-]+)'
to the config did the job
You should consider adding your working configuration amongst the others here: hacs_waste_collection_schedule/doc/source/ics.md at 7ea7a22103b76c57bb1fa265edeabde3ee817bbb · mampfes/hacs_waste_collection_schedule · GitHub
Hi,
I need some help with my configuration. I have two ics sources configured (as shown below). All events of both sources are shown in my calender. However only the first source is recognized by my sensors (also below).
I’ve already tried to switch the order of the sources. When I do so, it is still the first source which is working and the second doesn’t.
waste_collection_schedule:
sources:
- name: ics
calendar_title: Restmüll & Wertstoff
args:
url: https://waste.awb-landkreis-karlsruhe.de/WasteManagementKarlsruheHaushalteBlank/WasteManagementServiceServlet?ApplicationName=Calendar&SubmitAction=sync&StandortID=**XXXXXX**&AboID=**XXXXX**&Fra=RT;RC1;RC2;WT;WC;Schad;BT2;BT1;BC
customize:
- type: Wertstoffbehaelter
alias: Wertstoff
icon: mdi:recycle
- type: Restabfallbehaelter
alias: Restmuell
icon: mdi:trash-can
- name: ics
calendar_title: Papier
args:
url: https://www.blauetonne-schlauetonne.de/abfuhrkalender/{%Y}/XXXXXXX.ics
customize:
- type: Leerung der Blauen Tonne Schlauen Tonne
alias: Papier
icon: mdi:delete-variant
sensor:
- platform: waste_collection_schedule
name: Restmüll
details_format: "upcoming"
value_template: '{% if value.daysTo == 0 %}Heute{% elif value.daysTo == 1 %}Morgen{% else %}in {{value.daysTo}} Tagen{% endif %}'
types:
- Restmuell
- platform: waste_collection_schedule
name: Papier
details_format: "upcoming"
value_template: '{% if value.daysTo == 0 %}Heute{% elif value.daysTo == 1 %}Morgen{% else %}in {{value.daysTo}} Tagen{% endif %}'
types:
- Papier
- platform: waste_collection_schedule
name: Wertstoff
details_format: "upcoming"
value_template: '{% if value.daysTo == 0 %}Heute{% elif value.daysTo == 1 %}Morgen{% else %}in {{value.daysTo}} Tagen{% endif %}'
types:
- Wertstoff
- platform: waste_collection_schedule
name: RestmüllDatum
details_format: "upcoming"
value_template: 'am: {{value.date.strftime("%d.%m.%Y")}}'
types:
- Restmuell
- platform: waste_collection_schedule
name: WertstoffDatum
details_format: "upcoming"
value_template: 'am: {{value.date.strftime("%d.%m.%Y")}}'
types:
- Wertstoff
- platform: waste_collection_schedule
name: PapierDatum
details_format: "upcoming"
value_template: 'am: {{value.date.strftime("%d.%m.%Y")}}'
types:
- Papier
Ah, thanks you. Havn’t seen this. Works liike a charm .