HI, Not sure what I’m doing wrong.
I get the following error: “Unable to prepare setup for platform ‘waste_collection_schedule.sensor’: Unable to set up component.”
Mea culpa! I just figured out, that after getting errors and no data in calendar after 2024.5.1 I disabled integration and template sensors to avoid errors and did not enabled it again after update to 2024.5.2 After reenabling seems everything is working fine again Sorry for confusion!
I’m not the best person to ask on this as I am a complete amateur and tend to hack around until something works. Not sure how to paste code but below is what I have in my config.
Hope this helps
waste_collection_schedule:
sources:
- name: aucklandcouncil_govt_nz
args:
area_number: ENTER AREA NUMBER HERE
customize:
- type: Rubbish
icon: mdi:trash-can
sensors:
- platform: waste_collection_schedule
name: Rubbish
details_format: "upcoming"
value_template: "{{value.daysTo}}"
types:
- Rubbish
On waking today everything is fine again. I’m not familiar with the logs but think I’ve found what you’re after…
2024-05-17 16:47:57.060 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to import_module inside the event loop by custom integration ‘waste_collection_schedule’ at custom_components/waste_collection_schedule/waste_collection_schedule/source_shell.py, line 188: source_module = importlib.import_module( (offender: /config/custom_components/waste_collection_schedule/waste_collection_schedule/source_shell.py, line 188: source_module = importlib.import_module(), please report it to the author of the ‘waste_collection_schedule’ custom integration
So i have this source configured but i want to add also some extra dates. I have tried to this according to the documentation but the sensor that i have configured did not display the extra date. HOw can i add the second source as a date? Is it also possible to exlcude some dates?
I am trying to sort out the right type for a supported service provider where public holidays do reschedule the waste collection for 1 day and the type does not seem to be the usual (Restmülltonne, Bioabfallbehäter, Papiertonne) but with an addition of “(verlegt)”.
I wanted to add this 2nd type to my sensor to show also those rescheduled waste collection times but obviously I am doing something wrong here?
I added 3 new types to my source and added each of those to my sensor(s)!? What am I doing wrong?
I’ve been trying to do this for a few days and getting nowhere. Any chance someone could point me in the right direction?
I want to display a picture of the bin instead of the text. Is this possible?
waste_collection_schedule:
sources:
- name: tameside_gov_uk
args:
postcode: "OL7 9ER"
uprn: ""
customize:
- type: brown bin
alias: Brown
picture: local/community/brown_bin.jpg
- type: blue bin
picture: local/community/blue_bin.jpg
alias: Blue
- type: green bin
picture: local/community/green_bin.jpg
alias: Green
- type: black bin
picture: local/community/black_bin.jpg
alias: Black
sensor:
- platform: waste_collection_schedule
name: Bins
details_format: upcoming
value_template: '{{value.types|join(" & ")}} in {{value.daysTo}} days'
types:
- Brown
- Blue
- Green
- Black
I’ve uploaded the pictures to that location based on recommendations I had for a custom picture on the picture elements card
Thanks for everyones help help so far. I can confrim the pictures are in the right place, I tested it by just passing the path to a picture card and it was displayed.
I tried setting up the mushroom card too but that still just displayed text. This Friday my bin collection is ny Brown and Green bin. I have it configured so it currently displays
Brown & Green in 3 days
Is it because I have it combining multiple bin types into one card that the picture option doesnt work?
OK so I’ve done some testing and created another sensor which matches yours.
so far I think your problem is that to have a picture for multiple waste types you need to add it to your configuration.yaml
customize:
- type: Brown & Green bin
alias: Brown & Green
picture: local/community/brown_bin.jpg #new image(can only use one)
then add the new alias to your sensor
sensor:
- platform: waste_collection_schedule
name: Bins
details_format: upcoming
value_template: '{{value.types|join(" & ")}} in {{value.daysTo}} days'
types:
- Brown
- Blue
- Green
- Black
- Brown & Green
I haven’t finished testing but I think this is the issue
EDIT: SCRAP THAT… it won’t work because it will only match from the source, and there won’t be Brown & Green