It’s not working correctly. I tried different things and if I remember correctly, with “split_at” and only “Gelbe Tonne” I can see the correct dates but only for Gelbe Tonne/Gelber Sack, all others are unknown. There was one configuration which got me Schadstoffmobil too…
PS: I think the provider of the ICS tried to escape the comma since they are also using it in address like
Everything is working! The integration is awesome. My city has an iCal they provide but not url. No problem though since I was able to download the iCal and integrate into my HA!
My card shows the correct icon for the upcoming event and when perfectly, however I would like to add the “type” to the description. I’m sure it should go in the value_template? In the card graphic below, I’d like for it to say “Trash in 7 days” or “Bulk recycling in 7 days” or whatever the type is. I’ve seen examples using multiple sensors but I really only need the upcoming events, not a tile, icon, entity for each type. Is there a way to do this?
I should mention that sometimes there will be multiple types on the same day (i.e. Bulk recycling, glass.)
Hoping someone smarter than me can weigh in… I’m struggling to get anything working and seeing python errors in my logs:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 257, in _async_setup_component
result = await task
File "/config/custom_components/waste_collection_schedule/__init__.py", line 109, in async_setup
api.add_source_shell(
File "/config/custom_components/waste_collection_schedule/__init__.py", line 202, in add_source_shell
SourceShell.create(
File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/source_shell.py", line 196, in create
source = source_module.Source(**source_args) # type: ignore
File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/source/static.py", line 95, in __init__
self._start = parser.isoparse(start).date() if start else None
File "/usr/local/lib/python3.10/site-packages/dateutil/parser/isoparser.py", line 37, in func
return f(self, str_in, *args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/dateutil/parser/isoparser.py", line 134, in isoparse
components, pos = self._parse_isodate(dt_str)
File "/usr/local/lib/python3.10/site-packages/dateutil/parser/isoparser.py", line 208, in _parse_isodate
return self._parse_isodate_common(dt_str)
File "/usr/local/lib/python3.10/site-packages/dateutil/parser/isoparser.py", line 213, in _parse_isodate_common
len_str = len(dt_str)
TypeError: object of type 'datetime.date' has no len()
Am I being incredibly dense? At one point previously I managed to get a single sensor working and have re-installed via HACs a number of times, restarting inbetween (which often takes an age since adding WCSF).
Have you tried just setting up four sensors? You can configure the sensors in kind of a one-to-one relation to your source (aka source = paper => sensor = paper) or you can pack multiple sources in one sensor (aka source = waste collection provider => sensor = paper, garbage,…).
I’d go with the one-to-one relation, but as you have definied more than one source, you need to connect the sensor with the specific source, something like this:
The basic idea, that people get confused with is the connection between sources and sensors. Sources are only to get data. What happens with this data is up to the sensors. So you can define the relationships between source and sensor in many ways, and that’s where it gets confusing. As I said, in your case I’d go with one-to-one, just for easier setup and maintenance.
Making that change HA hung when I did a full restart (though still responded to pings). Power cycling had everything booting up and the recycling sensor shows properly… the other two are showing as unknown - any ideas?
First, look into the logs after a restart of HA (doesn’t need to be the machine, only HA), this is assuming you run HomeAssistantOS or supervised install. If that doesn’t bring up anything meaningful, set the logger to DEBUG for this integration only and restart.
I’m running on a home assistant yellow with the yellow version of HAOS - thanks for the guide on logs!
(I do get some errors involving aiohttp.server and another set involving switchbot but I think that’s unlreated and fairly common)
Assuming
Hmmm, have you checked if “WCSF” is really the culprit? Look under settings → system → repairs → three dots in the upper right, choose 'Integration Startup Time" and see how long it takes WCSF to start. If you’ll see another integration taking a long time, you may have the culprit there.
I played a little with the source index. It seems per the docs the first index is 0. I re-numbered mine and after a reboot I get two sensors now. Garbage (index 0 ) and branches (index 3). Lost yard collection after the re-numbering. I’m not understanding the docs well enough to figure how what I am doing incorrectly.
With my sensor above I get the following errors in HA:
Logger: homeassistant.components.sensor
Source: custom_components/waste_collection_schedule/waste_collection_schedule/collection_aggregator.py:17
Integration: Sensor (documentation, issues)
First occurred: 8:14:13 PM (2 occurrences)
Last logged: 8:14:13 PM
Error adding entities for domain sensor with platform waste_collection_schedule
Error while setting up waste_collection_schedule platform for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 455, in async_add_entities
await asyncio.gather(*tasks)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 731, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 844, in add_to_platform_finish
await self.async_added_to_hass()
File "/config/custom_components/waste_collection_schedule/sensor.py", line 141, in async_added_to_hass
self._update_sensor()
File "/config/custom_components/waste_collection_schedule/sensor.py", line 200, in _update_sensor
upcoming1 = self._aggregator.get_upcoming_group_by_day(
File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/collection_aggregator.py", line 65, in get_upcoming_group_by_day
self._entries,
File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/collection_aggregator.py", line 17, in _entries
return [e for s in self._shells for e in s._entries]
File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/collection_aggregator.py", line 17, in <listcomp>
return [e for s in self._shells for e in s._entries]
AttributeError: 'NoneType' object has no attribute '_entries'
All 4 sensors are adding the information in the HA calendar. Only the next yard waste sensor shows a value.
I am using a MDT Glastaster to show next waste collection an wanted to shorten the words Papier to P Restmüll to R Bio to B…
because the state on the knx device just allows 10 letters.
I don’t know how to transform this words within my template?!
I tried something like : ‘{% if {{value.types|join(", ")}} == Papier %}P{% endif %}’