Bin / Waste Collection


yup its called a button on a dashboard.
when we put the bin out and come in agai, we push the button that we did it so that we dont get reminders anymore.
untill then we are reminded every hour.


Would you be able to share the code for that?


its an appdaemon app.
do you have appdaemon installed?

what it actually does:
check google calendar (installed in HA) at 0:00
if a bin needs to go out next day an input boolean is flipped to on
every day between set times it checks on the hour if the boolean is on
if the boolean is on it checks the calendars which bin needs to go out and send a notify (in my case alexa TTS)


Wow, RFID on a trashcan? That seems overkill to me. But I guess a few bad seeds will do that to ya. I honestly never thought about putting trash in a bin and rolling to another house on the street.



Works perfectly for me as this is the same method my council use for the bin collections.

For the days left I used the following python script:

import datetime
import bin_collection_dates
from datetime import *

today =
future = bin_collection_dates.next_collection
diff = future - today
days_left = str(diff.days)

This assumes that your bin collection dates script is called

Thanks for the scripts @Rookeh!!!



sorry to bump into this thread, but I would really like to have this sensor for days_left.

I use another waste package (@xirixiz’s mijnafvalwijzer) and have a sensor giving me the next pickup in this format:

  - platform: scrape
    resource: !secret scrape_resource_date
    name: Afval Datum
    select: ".firstDate"
    scan_interval: 60 

with this as output:


would there be any way to reformat that, and use it in a template to count the days left?

thanks for any help

Garbage pickup date ( custom_component

How about something like this?



I’ll note that one.
it doesn’t work though in my setting, because my sensor.afval_datum doesn’t return a timestamp, but a string.
Can we somehow make a timestamp out of a string?


Can you try something like


Would anyone be able to help with the following website?

Unable to scrape the information required, and cannot install pup to be able to scrape that info either.

Any help would be appriciated!


I’ll give you a hand mate after Christmas- struggling for time at the min


Your council website is pretty easy to read - have you tried a simple scrape sensor

  - platform: scrape
    resource: ""
    name: "Refuse Collection"
    select: ".mysedgemoor-list__item__wrapper:nth-child(9)"
    scan_interval: 300


  - platform: scrape
    resource: ""
    name: "Garden Collection"
    select: ".mysedgemoor-list__item__wrapper:nth-child(11)"
    scan_interval: 300


Thanks Rob for the help! The refuse scrape worked, but for the Garden Collection i just get unknown for this. I’ve tired to play around with the nth-child but nothing appears


Can you try

select: “.mysedgemoor-list__item__wrapper:nth-child(11) .mysedgemoor-list__data”


Just tried that one again, it is unable to scrape the information


For completeness here is @Stringyb92’s solution for anyone else interested.

      - platform: scrape
    resource: ""
    name: "Refuse Collection Scrape"
    select: ".content__wrapper--withmenu > div:nth-of-type(7) > div:nth-of-type(2)"
    scan_interval: 86400
      User-Agent: Mozilla/5.0

  - platform: scrape
    resource: ""
    name: "Garden Waste Collection Scrape"
    select: ".content__wrapper--withmenu > div:nth-of-type(9) > div:nth-of-type(2)"
    scan_interval: 86400
      User-Agent: Mozilla/5.0



I get the JSON, listed below back from my community when I do a post to their API:
How can I filter out the next collection date from this JSOn and display it in my dashboard? It must be done with value templating and json but I can’t figure it out exactly.

With kind regards,

The Netherlands

    "pickupDates": [
    "pickupType": 0,
    "_pickupType": 0,
    "_pickupTypeText": "GREY",
    "description": "GREY"
    "pickupDates": [
    "pickupType": 10,
    "_pickupType": 10,
    "_pickupTypeText": "PACKAGES",
    "description": "PACKAGES"
    "pickupDates": [
    "pickupType": 1,
    "_pickupType": 1,
    "_pickupTypeText": "GREEN",
    "description": "GREEN"
    "pickupDates": [
    "pickupType": 2,
    "_pickupType": 2,
    "_pickupTypeText": "PAPER",
    "description": "PAPER"


How easy is that one to scrape? could you provide assistance with that one please?


Not that easy - I grabbed a sample url below : if you follow my original post using this url it might work for you

curl '' -H 'Connection: keep-alive' -H 'Cache-Control: max-age=0' -H 'Upgrade-Insecure-Requests: 1' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8' -H 'Referer:' -H 'Accept-Encoding: gzip, deflate, br' -H 'Accept-Language: en-US,en;q=0.9' -H 'Cookie: lypkOO2pWJKOxrF8=5detrahedrqa4dukbs724tdu5ng6n9g2r5taq1hi7hnimfgo87n0; TestCookie=Test; __utma=258801043.1600286332.1549929041.1549929041.1549929041.1; __utmc=258801043;|utmccn=(referral)|utmcmd=referral|utmcct=/; __utmt=1; mylocation=%7B%22postcode%22%3A%22LE100FR%22%2C%22myaddress%22%3A%22Hinckley+And+Bosworth+Borough+Council%2C+The+Hinckley+Hub%2C+Rugby+Road%2C+Hinckley%2C+Leicestershire%2C+LE10+0FR%22%2C%22uprn%22%3A%22010090028045%22%2C%22usrn%22%3A%2217401086%22%2C%22ward%22%3A%22CAS%22%2C%22parish%22%3A%22%22%2C%22lng%22%3A%22-1.3763956159446%22%2C%22lat%22%3A%2252.535658758267%22%7D; __utmb=258801043.4.10.1549929041; socitm_exclude_me29=true' --compressed