Strange. The configuration is valid and my machine doesn’t hang up with it. However, the url returns error 404 (bad request) - but this has nothing to do with your initial issue.
That is due to the random id, did not want to share my real calendar here
After another restart of home assistant it does now indeed work, strange as well but so far looking good, thanks!
I just realized that my ics google calendar query does not work with 1.16
Downgraded to 1.15 → working again. Haven´t seen any changes apart from new cities.
Any logs for interest?
Please check if it is this issue: fetch failed for source ICS · Issue #176 · mampfes/hacs_waste_collection_schedule · GitHub
Excellent, thanks for this info.
Need help, guys! Sorry, here’s someone again who can’t do it alone.
Entity Card:
type: custom:auto-entities
sort:
method: daysto
card:
type: entities
state_color: true
show_header_toggle: false
entities:
- sensor.restmuell
- sensor.gelbetonne
- sensor.papiermuell
- sensor.bioabfall
Sensor:
# ---------------------------------------
# Abfallkalender
# ---------------------------------------
- platform: waste_collection_schedule
name: Restmuell
add_days_to: True
details_format: "upcoming"
value_template: '{% if value.daysTo == 0 %}Heute{% elif value.daysTo == 1 %}Morgen{% elif value.daysTo == 2 %}Übermorgen{% else %}{{value.daysTo}} Tage{% endif %}'
types:
- Restmuell
- platform: waste_collection_schedule
name: Bioabfall
add_days_to: True
details_format: "upcoming"
value_template: '{% if value.daysTo == 0 %}Heute{% elif value.daysTo == 1 %}Morgen{% elif value.daysTo == 2 %}Übermorgen{% else %}{{value.daysTo}} Tage{% endif %}'
types:
- Bioabfall
- platform: waste_collection_schedule
name: GelbeTonne
add_days_to: True
details_format: "upcoming"
value_template: '{% if value.daysTo == 0 %}Heute{% elif value.daysTo == 1 %}Morgen{% elif value.daysTo == 2 %}Übermorgen{% else %}{{value.daysTo}} Tage{% endif %}'
types:
- GelbeTonne
- platform: waste_collection_schedule
name: PapierMuell
add_days_to: True
details_format: "upcoming"
value_template: '{% if value.daysTo == 0 %}Heute{% elif value.daysTo == 1 %}Morgen{% elif value.daysTo == 2 %}Übermorgen{% else %}{{value.daysTo}} Tage{% endif %}'
types:
- PapierMuell
Look:
Why won’t it work?
I am not an expert too and I cannot find the knot in your lines.
Did you try to copy your script in developer tools and play around with it? With this tool I found some mistakes and got things to work.
What is your actual problem? Do you want to sort entries by date?
I’m not an expert for auto-entities, but I think the problem is that you use an invalid sort method. Try this:
Don’t forget to enable add_days_to
in the waste_collection_schedule configuration!
Anyone able to assist with how I can split this detail into Rubbish and Recycling as I’ve tried to do (which didn’t work)
Have read all the docs but not sure what I’m doing wrong. I’m using this source if it matters. Does seem to be fetching the data ok. The sensors part of my configuration.yaml is as below. Anything else I try to do just comes up as Unavailable as in my screenshot.
sensor:
- platform: waste_collection_schedule
name: next_garbage_collection
value_template: 'in {{value.daysTo}} days'
types:
- Rubbish
- platform: waste_collection_schedule
name: next_recycle_collection
value_template: 'in {{value.daysTo}} days'
types:
- Recycle
sensor:
- platform: waste_collection_schedule
name: Auckland Rubbish
And then if I remove the bottom sensor from my configuration.yaml so it looks like…
sensor:
- platform: waste_collection_schedule
name: next_garbage_collection
value_template: 'in {{value.daysTo}} days'
types:
- Rubbish
- platform: waste_collection_schedule
name: next_recycle_collection
value_template: 'in {{value.daysTo}} days'
types:
- Recycle
Then the state is unknown
Thanks for any assistance!
EDIT: I think the issue is with my full configuration.yaml, got a duplicate key mapping i need to figure out how to fix
Waste type names are case sensitive. Please try ‘rubbish’ and ‘recycle’.
Ah, so simple! Thought I had tried that. Working now thank you.
Hi. Need some assistance with this.
For some reason my Waste Collector adds the date to every calendar entry in the ICS File. So they all look something like this: “Abfuhrtermin Bioabfall Am 16.04.2022”
How can I set up my Waste Collection Schedule correctly?
My provider has a list of ics files for every type of waste and town. They can be downloaded separately from the website and get updated as well. Is this even possible to fetch with this plugin?
Currently, there is no easy way to handle that. We could either add a new source or enhance the ICS source. Please open an issue on github.
Yes, you can add multiple ICS sources. One per file.
One means one collection date. That is not the way.
I might find a way to get all ics and make one single file, download and use it in the plugin.
I always get the error message:
2022-04-10 08:15:53 ERROR (SyncWorker_6) [waste_collection_schedule.scraper] fetch failed for source ICS:
Traceback (most recent call last):
File “/var/snap/home-assistant-snap/487/custom_components/waste_collection_schedule/waste_collection_schedule/scraper.py”, line 116, in fetch
entries = self._source.fetch()
File “/var/snap/home-assistant-snap/487/custom_components/waste_collection_schedule/waste_collection_schedule/source/ics.py”, line 182, in fetch
return self.fetch_file(self._file)
File “/var/snap/home-assistant-snap/487/custom_components/waste_collection_schedule/waste_collection_schedule/source/ics.py”, line 211, in fetch_file
f = open(file)
FileNotFoundError: [Errno 2] No such file or directory: ‘www/Abfallkalenderw.ics’
I tried the whole path /avr/snap/home-assistant-snap/487/www/… to define the file location , copied the ICS File to /487 folder where the configuration.yaml is locatet nothing worked.
Here is my waste-collection-schedule part in configuration.yaml
#Abfallkalender
waste_collection_schedule:
sources:
- name: ics
args:
file: “www/Abfallkalenderw.ics”
version: 1
customize:
- type: Restabfall 2-woechentlich
alias: restmuell
show: true
icon: mdi:trash-can
- type: Papier
alias: papier
icon: mdi:recycle
- type: Gelber Sack
alias: gelbersack
icon: mdi:recycle
- type: Biotonne
alias: biomuell
icon: mdi:recycle
calendar_title: “Müllabfuhr”
fetch_time: “06:00”
day_switch_time: “11:00”
separator: “;”
The sensors are visible, but without collection information.
I tried also the hint to use Version: 1 in the listing of the W-C-S
Nothing worked.
I use W-C-S version 1.18.0
Installationstyp |Home Assistant Core|
Version core-2022.2.9
Entwicklung |false|
Supervisor |false|
Docker |false|
Benutzer |root|
Virtuelle Umgebung |true|
Python-Version |3.9.8|
Betriebssystemfamilie |Linux|
Betriebssystem-Version |5.13.0-39-generic|
What´s going wrong??
Sorry, I didn’t get you point. Can you share an example or link your service provider?
The version attribute is not relevant for your issue.
Home assistant can be installed in many ways (and many locations), therefore there is no easy way to get the path for ICS files.
I have 2 advices:
- Absolute paths works in a lot of cases. In your example, the source files are located under
/var/
, but you wrote that you configured/avr/
. Is this just a typo here? - You can add a debug printf with
os.getcwd()
somewhere in the integration code to find out the current working directory of python. This could help to find the correct relative path. - Try
config/www/Abfallkalenderw.ics