Thanks a lot for your component! Itās exactly what I was looking for, as my waste collection provider changed his āapiā a few weeks ago, so my old setup didnāt work anymore.
Problem is, I donāt get any values for the sensors. I assume / guess, that is has something to do with the format I get the iCal data. E.g. I have LANGUAGE=de right before the entry in summary. Could you take a look at that?
and here is the link to the iCal download (no worry, itās not my address in the file): https://xmlcall.awista-starnberg.de/WasteManagementStarnberg/WasteManagementServiceServlet?ApplicationName=Calendar&SubmitAction=sync&StandortID=183695001&AboID=4310&Fra=R;P;G;B;S
Would be great, if you could take a look at it. Thanks a lot!
The problem was that your service provider adds an unnecessary whitespace to the appointment type, e.g. "Restmuell ". Therefore your type filters didnāt match. You could fix this also in your configuration.yaml, but I decided to now strip all leading and tailing whitespaces from the appointment types. Therefore your current configuration should work after the update.
Yep, that totally sounds like themā¦ The last āapiā they provided was an Excel or *.pdf download, so I donāt want to complain!
Thanks a lot for the really quick fix, all is working as intended now! I assume the other way via configuration.yaml would be to put an ā ā at the end like 'Restmuell '. But as said, it works out-of-the-box right now, thank you!
I tried to use the waste collection schedule with a local ics file as well as with an url but it does not show anything in my sensor an in the home-assistant.log I have this entry:
2020-09-04 15:19:13 ERROR (SyncWorker_19) [custom_components.waste_collection_schedule.package.scraper] fetch failed for source <custom_components.waste_collection_schedule.package.source.ics.Source object at 0x51e8cd50>: Expected datetime, date, or time, got: '5'
I donāt know how to attach the file directly, but you can download it via the link
And regarding the link I have also a question. The link contains the current unix timestamp after the year. Do you know how I have to edit the ics.py skript that it adds the timestamp automatically after the {%Y} wildcard?
EDIT: I deleted line by line of the ics file to figure what causes the error.
So now I know that this line of my ics file causes the error:
DURATION:5
Without that line everything is working fine.
So any idea what to change in the ics skript that it is working for me?
Right: ā5ā for duration is an invalid value. Please inform your service provider to fix the problem in their ics file generator.
As a workaround you could use filter to remove the invalid lines. Example (not tested!!!):
Add after line 117 in ics.py: data = filter(lambda line: 'DURATION' not in line, data.splitlines())
Regarding the timestamp: Although it looks like a unix timestamp, it is probably a unique id for the choices (city, types, ā¦) you made previously in the web frontend. The generated link is only valid for a certain period of time (the link above already doesnāt work any more). If you want to retrieve the schedule daily (instead of storing it once into a file) you have to write a dedicated scraper for abfallkalender-ab.de (for examples see other scrapers).
Have been running the waste collection schedule against my own calendar ics file with the bin collection days for a while now - but in the last few days since my home assistant had a segmentation fault the waste_collection_schedule isnāt working - it does not contain any information and if I restart Home assistant it doesnāt do anything. In the logs there is only the reference to the usual loading;
[homeassistant.loader] You are using a custom integration for waste_collection_schedule which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
Any idea on how to get the component working again?
interestingly they were recurring events, but had finished at the end of this month as I could still see them in the calendar the ics file is published from so shouldāve still shown something on the schedule.
I extended the same reoccurring events for another month and they are now appearing! So may not have got the last entry for each of those events
But i have no clue how to use that output for getting it as a source in your framework. If you have an idea to push me in the right direction, go for it. Thanx in advance!
I tried to figure out how the āTrenntstadtā api is working, but I failed to find a valid combination of Strasse of PLZ. Could you please share one?
I wonder, why this automation doesnāt work. The status āRestmĆ¼ll-Tonne in 1 Tagenā is correct and it should produce a notification one day before the garbage will be collected:
alias: Nachricht RestmĆ¼ll
description: ''
trigger:
- platform: state
entity_id: sensor.waste_collection_waste
to: RestmĆ¼ll-Tonne in 1 Tagen
condition:
- condition: time
after: '13:30'
action:
- data:
message: Morgen wird der RestmĆ¼ll abgeholt.
service: notify.telegram_ha_message
mode: single
Maybe, because the status was already āRestmĆ¼ll-Tonne in 1 Tagenā, when I created the rule and it will only run, when the status changed?
- id: 'xxx'
alias: RestmĆ¼llinfo
description: ''
trigger:
- platform: time
at: '13:00'
condition:
- condition: state
entity_id: sensor.mybuttoncardsensorrest
state: Restabfall Morgen # or in 7 Tagen, or something
action:
- service: notify.mobile_app_daves_samsung
data:
message: Morgen wird die RestmĆ¼lltonne abgeholt.
mode: single
ā¦ but the state of sensor.mybuttoncardsensorrest never is like āRestabfall Morgenā - it is a formated date from the value template of the sensor.
I donāt get the idea how to format my automation condition state to get the state like in the value template or as the shown āreadable wordsā.