Wow, thanks for your efforts on this. I’ll have a play with your suggestion later on. Much appreciated
Hi
Would it be possible to add in waste collection days for Townsville?
https://www.townsville.qld.gov.au/water-waste-and-environment/waste-and-recycling/bin-collection-days
Example address is 10 Woodwark Drive, Bushland Beach
Thanks in advance
I would say, it’s not possible, sorry. As long as you can’t access data by calling something like an API or download a calendar in ICS format, there is only the scrape of the website and that is complicated and out of the scope of this integration.
On the other hand, do you really need that? As far as I could see, your bin collection follows a strict timetable, even on holidays. You have collection every week on tuesdays and additionally every other week recycling. This is one of the cases, where it makes much more sense just to setup a simple automation, that covers a weekly and bi-weekly schedule.
For newbies like me, struggling with the sensors not showing up: try to collect all your sensors in the configuration.yaml
under a single sensor:
tag, even if they are from different platforms… For example,
sensor:
- platform: waste_collection_schedule
name: Communal waste
value_template: 'in {{value.daysTo}} days, on {{value.date.strftime("%a")}}'
types:
- Green Bin
- platform: template
sensors:
gla_door_frontleft:
friendly_name: "Front Left Door"
That’s not specific to this integration. But normally you shouldn’t be able to safe the file, when you have included a domain (in this case the domain is “sensor”) more than once…
But there are so many other ways to keep your configuration files in order, that one can’t take that as a general advice.
Thanks for the clarification I agree, this is not specific to this integration - it was a red herring for me! I saved the file and the built in yaml checker didn’t flag anything. HA functioned well for weeks (with repeated manual restarts) before I the duplicate domain became suspicious
Strange! Normally you shouldn’t be able to save that file… But that is something for another time to investigate.
Anyway, good you got it working!
How to add a new wast collector to the list.
title: `Ôffalkalinder` van Noardeast-Fryslân & Dantumadiel
url: https://offalkalinder.nl/
country:
howto: |
- Goto <https://offalkalinder.nl/wanneer> and add your postcode and housenummer. (9074DL, 1)
- Click on `Zet in agenda`
- Click on `Kopieer naar klembord`
- Replace the `url` in the example configuration with this link.
test_cases:
Oppach:
url: "https://offalkalinder.nl/ical/1722200000001856"
I’m having issues getting my data to display, whenever I try to add from the ui I get message to say I can only add via the configuration.yaml file, I think I have setup the yaml file, but still can’t see anything in devices or entities, any idea what I’m doing wrong? My yaml file is below:
Summary
# Loads default set of integrations. Do not remove.
default_config:
# Load frontend themes from the themes folder
frontend:
themes: !include_dir_merge_named themes
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
waste_collection_schedule:
sources:
- name: cheshire_west_and_chester_gov_uk
args:
uprn:1234456789
sensor:
- platform: waste_collection_schedule
name: cheshire_west_and_chester_gov_uk
details_format: generic
That’s my entire yaml, only thing I changed is the uprn for privacy
On just a short look, your indentation is wrong.
Yours:
waste_collection_schedule:
sources:
- name: cheshire_west_and_chester_gov_uk
args:
uprn:1234456789
Instead:
waste_collection_schedule:
sources:
- name: cheshire_west_and_chester_gov_uk
args:
uprn:1234456789
“Sources” is two spaces to much to the right.
But normaly that should give an error, if you try to save it that way, at least I thought so…
Was that it?
the only thing to try if @paddy0174 suggestion doesn’t work would be to put the uprn number in quotes
waste_collection_schedule:
sources:
- name: abcdefg
args:
uprn: "123456789"
Doesn’t seem to be, the error I get when validating is
Invalid config for ‘waste_collection_schedule’ at configuration.yaml, line 17: expected dict for dictionary value ‘waste_collection_schedule->sources->0->args’, got ‘uprn:123455678’
Invalid config for ‘waste_collection_schedule’ at configuration.yaml, line 19: ‘sensor’ is an invalid option for ‘waste_collection_schedule’, check: waste_collection_schedule->sensor
Figured it out, missing a space after uprn (in addition to the other suggestions!)
It now returns a single sensor with all of the bins, so you know how I get seperate sensors for each bin? I’m not sure how to get the separate names for each sensor
yes, we can help but it’s more beneficial for you to read up with what you need to do. I can post my sensors but they won’t work for you.
if you have 3 different bins you need 3 sensors setup like the example from the docs
sensor:
- platform: waste_collection_schedule
name: NAME
value_template: VALUE_TEMPLATE
date_template: DATE_TEMPLATE
add_days_to: ADD_DAYS_TO
types:
- Waste Type 1
- Waste Type 2
waste type 1 and 2 must match what’s returned from the source unless you have specified an alias in the configuration.yaml
if you have 2 bins collected on the same day like I do you can use 1 sensor
this is my sensors for recycling and garden waste which is collected on the same day. hopefully point you in the right direction.
- platform: waste_collection_schedule
name: Recycle & Garden
details_format: upcoming
value_template: '{{value.types|join(", ")}} {% if value.daysTo == 0 %}Today{% elif value.daysTo == 1 %}Tomorrow{% else %}in {{value.daysTo}} days{% endif %} '
date_template: '{{value.date.strftime("%d.%m.%Y")}}'
add_days_to: true
types:
- "Recycling (Blue)"
- "Garden (Brown)"
I am most probably making this more confusing for you (sorry).
check the docs and if you need help just ask.
Thank you, that helps!
you can always create a pull request in GitHub (needs some knowledge of git) Or try to contact someone who will open one for you (Github Issue, Conversation). I will try to look in here more often in the future
I added your ICS documentation here: added offalkalinder_nl ICS Documentation by 5ila5 · Pull Request #2181 · mampfes/hacs_waste_collection_schedule · GitHub
I created a Issue in Github I may look into it later/in the coming days
I don’t know if I’m too late but it looks like there is a space in the verlegt events so you probably need to write it like this. (you also named your Restmüll Rest-verlegt
instead of Rest_verlegt
:
#[...]
- type: Restmülltonne (verlegt)
alias: Rest_verlegt
icon: mdi:trash-can
#[...]
- type: Bioabfallbehälter (verlegt)
alias: Bio_verlegt
icon: mdi:flower-outline
I have this setup and almost working. How do I get it to pull the correct collection days from the council? All bins show the same collection day. This is my code
waste_collection_schedule:
sources:
- name: east_renfrewshire_gov_uk
args:
postcode: "G77 6LG"
uprn: "131036238"
customize:
- type: Grey Bin
- type: Blue Bin
- platform: waste_collection_schedule
name: Grey Bin
details_format: upcoming
value_template: 'in {{value.daysTo}} days'
- platform: waste_collection_schedule
name: Blue Bin
details_format: upcoming
value_template: 'in {{value.daysTo}} days'
And this is resulting card
Would appreciate help to get the correct days.
Thanks
is your grey bin in 6 days?
your second sensor is indented to far to the right