Waste Collection Schedule Framework

Hi.
I decided to go with the YouTube instructions. They are using Node-Red for the automation.
Another really powerful tool I am not familiar with until now. For starters everything is set up correctly and I started to test it out a little.
I just started yesterday with some Nodes. It does help me quite bit. As a guide I used this as a video: Automation in Node Red.
Which sensor would I use?
sensor.papierabfall_collection
or
sensor.papierabfall_date
My “current State Node " seems lo look different. The guy in the video has an If state in the string of his sensor where for me it is justt any text
string I could type in (left empty) What should I put there, where is that derived from? (minute 16:07)
How do I correctly type the color in data of the Hue lights. (I would like ta have it in color_name"Blue”. How do I put that in correct json format.

I put: {"rgbw_color":[0,0,255,20]}
it is not as fancy but it is at least the color I am looking for - a bright blue. No I need the string for the state sensor of Altpapier sensor.papierabfall_date when it is due tomorrow.

I tried with Developer States where I set the state of sensor.papierabfall_collection, it states 2 as the state. However I cannot derive what to put in the Node for the current state. Is it a string a number or something completely different.

Hello,

I am currently trying to integrate the waste calendar into Home Assistant via “Waste Collection Schedule”. I now get entries displayed, but unfortunately they are the wrong values. I find the entry on the page: AWIDO Widget

Config:

waste_collection_schedule:
  sources:
    - name: awido_de
      args:
        customer: awb-ak
        city: "VG Daaden-Herdorf - Kernstadt Herdorf"


Thanks for help.

Hi,

currenlty I’m using the custom card to show this:


I was wondering if there is a way to use the new tile cards from home assistant.

Thanks.

I am definitely missing a trick with the setup for this.

I am running HA Container on a raspberry pi. I can edit the configuration.yaml and can restart HA no problem. In the Log I can see that the waste_collection_schedule integration is picked up by HA as it warns me that it is untested, so I know that the configuration.yaml is being read.

In my configuration.yaml file I have:

# Waste collection
waste_collection_schedule:
  sources:
    - name: static
      args:
        type: General
        frequency: WEEKLY
        interval: 1
        start: '2023-01-03'
        until: '2023-12-26'
    - name: static
      args:
        type: Reycling
        frequency: WEEKLY
        interval: 1
        start: '2023-01-04'
        until: '2023-12-27'
sensor:
  - platform: waste_collection_schedule
    source_index: 0
    name: waste_collection_general
    details_format: upcoming
    count: 2
    leadtime: 2
    types:
      - General
  - platform: waste_collection_schedule
    source_index: 1
    name: waste_collection_recycling
    details_format: upcoming
    count: 2
    leadtime: 2
    types:
      - Recycling

I can’t see any sensor entities being created after a restart. Is there an error in my config somewhere?

Don’t you need a city_id and area_id ? Did you take the exact name from the garbage file?
That’s what it looks like in Germany. Had to download the ICS file and extract and paste the data there.

Bildschirmfoto 2023-03-16 um 13.26.59
`

------- Garbage Collection -------

next collection

  • platform: waste_collection_schedule
    name: “Nächste Abholung”
    value_template: ‘{{value.types|join(", ")}}{% if value.daysTo == 0 %} Heute{% elif value.daysTo == 1 %} Morgen{% else %} in {{value.daysTo}} tagen{% endif %}’

Nächste Restmüll-Abholung

  • platform: waste_collection_schedule
    name: “Restmüll”
    value_template: ‘{% if value.daysTo == 0 %} Heute{% elif value.daysTo == 1 %} Morgen{% else %} in {{value.daysTo}} tagen{% endif %}’
    types:
    • Restmüll

Nächste Biomüll Abholung

  • platform: waste_collection_schedule
    name: “Biomüll”
    value_template: ‘{% if value.daysTo == 0 %} Heute{% elif value.daysTo == 1 %} Morgen{% else %} in {{value.daysTo}} tagen{% endif %}’
    types:
    • Biomüll

Nächste gelber-Sack Abholung

  • platform: waste_collection_schedule
    name: “Gelber Sack”
    value_template: ‘{% if value.daysTo == 0 %} Heute{% elif value.daysTo == 1 %} Morgen{% else %} in {{value.daysTo}} tagen{% endif %}’
    types:
    • Gelber Sack

Nächste Papiermüll Abholung

  • platform: waste_collection_schedule
    name: “Altpapier”
    value_template: ‘{% if value.daysTo == 0 %} Heute{% elif value.daysTo == 1 %} Morgen{% else %} in {{value.daysTo}} tagen{% endif %}’
    types:
    • Altpapier
      `
1 Like

There is no published schedule for my city, so I used the “static” as specified here: hacs_waste_collection_schedule/static.md at 4a60fc5cfa868c4efa3270c0ae68691816192f20 · mampfes/hacs_waste_collection_schedule · GitHub

I just don’t see any sensors showing up in the list of entities, or anywhere else for that matter :slight_smile:

I’m struggling with static sources too. In my case it looks like it does not work with two static sources. With my current config (below) only all_waste and rubbish have working sensors but recycling does not.
Anyone able to help explain what I may have done wrong?

My current code is like this;

waste_collection_schedule:
  sources:
    - name: static
      args:
        type: rubbish
        frequency: WEEKLY
        interval: 2
        start: '2023-03-20'
        until: '2024-01-01'
      customize:
        - type: rubbish
          icon: mdi:bin

    - name: static
      args:
        type: recycling 
        frequency: WEEKLY
        interval: 2
        start: '2023-03-27'
        until: '2024-01-01'
      customize:
        - type: recycle
          icon: mdi:recycle

sensor:
  - platform: waste_collection_schedule
    name: all_waste_types
    source_index: [0, 1]

  - platform: waste_collection_schedule
    name: rubbish
    source_index: 0
    types:
      - rubbish
      
  - platform: waste_collection_schedule
    name: recycle
    source_index: 1
    types:
      - recycle

@Calorian: rename recycling to recycle

Ugh, apologies. I went round and round in circles over thinking the checking and still missed that. Should’ve stepped back for half hour.
Thanks!

really confused with this

I have in my configuration.yaml the below

waste_collection_schedule:
    sources:
    - name: bromley_gov_uk
      args:
        property: 123456

and also

sensor:
  - platform: waste_collection_schedule
    source_index: SOURCE_INDEX
    name: Bromley_waste
    details_format: DETAILS_FORMAT
    count: COUNT
    leadtime: LEADTIME
    value_template: VALUE_TEMPLATE
    date_template: DATE_TEMPLATE
    add_days_to: ADD_DAYS_TO
    types:
      - Waste Type 1
      - Waste Type 2

But cant seem to see any data and errors when loading YAML

small update i can now see data only for rubbish not the others?

image

image

sensor being used is

waste_collection_schedule:
    sources:
    - name: bromley_gov_uk
      args:
        property: 123456
        
       
 
sensor:

  - platform: waste_collection_schedule
    source_index: 0
    name: Rubbish  # Change this to whatever you want the UI to display
    details_format: generic
    date_template: '{{value.date.strftime("%A %d %B %Y")}}'  # date format becomes 'Tuesday 1 April 2022'
    value_template: 'in {{value.daysTo}} days'

  - platform: waste_collection_schedule
    source_index: 1
    name: Recycling  # Change this to whatever you want the UI to display
    details_format: generic
    date_template: '{{value.date.strftime("%A %d %B %Y")}}'  # date format becomes 'Tuesday 1 April 2022'
    value_template: 'in {{value.daysTo}} days'

  - platform: waste_collection_schedule
    source_index: 2
    name: Garden  # Change this to whatever you want the UI to display
    details_format: generic
    date_template: '{{value.date.strftime("%A %d %B %Y")}}'  # date format becomes 'Tuesday 1 April 2022'
    value_template: 'in {{value.daysTo}} days'

You probably need to add the type of waste, like this:

  - platform: waste_collection_schedule
    source_index: 1
    name: Recycling  # Change this to whatever you want the UI to display
    details_format: generic
    date_template: '{{value.date.strftime("%A %d %B %Y")}}'  # date format becomes 'Tuesday 1 April 2022'
    value_template: 'in {{value.daysTo}} days'
    type: "Mixed Recycling (Cans, Plastics & Glass)"

so using that code i get

image

waste_collection_schedule:
    sources:
    - name: bromley_gov_uk
      args:
        property: 1111
        types:
          - Food Waste
          - Garden Waste
          - Mixed Recycling (Cans, Plastics & Glass)
          - Non-Recyclable Refuse
          - Paper & Cardboard
       
 
sensor:  
      

  - platform: waste_collection_schedule
    source_index: 1
    name: Recycling  # Change this to whatever you want the UI to display
    details_format: generic
    date_template: '{{value.date.strftime("%A %d %B %Y")}}'  # date format becomes 'Tuesday 1 April 2022'
    value_template: 'in {{value.daysTo}} days'
    type: "Mixed Recycling (Cans, Plastics & Glass)"   

so i fixed the code error with

waste_collection_schedule:
    sources:
    - name: bromley_gov_uk
      args:
        property: 123456
        types:
          - Food Waste
          - Garden Waste
          - Mixed Recycling (Cans, Plastics & Glass)
          - Non-Recyclable Refuse
          - Paper & Cardboard
       
 
sensor:  
      

  - platform: waste_collection_schedule
    source_index: 1
    name: Recycling  # Change this to whatever you want the UI to display
    details_format: generic
    date_template: '{{value.date.strftime("%A %d %B %Y")}}'  # date format becomes 'Tuesday 1 April 2022'
    value_template: 'in {{value.daysTo}} days'
    types: "Mixed Recycling (Cans, Plastics & Glass)"      


  - platform: waste_collection_schedule
    source_index: 2
    name: Garden Waste  # Change this to whatever you want the UI to display
    details_format: generic
    date_template: '{{value.date.strftime("%A %d %B %Y")}}'  # date format becomes 'Tuesday 1 April 2022'
    value_template: 'in {{value.daysTo}} days'
    types: "Garden Waste"   
    
  - platform: waste_collection_schedule
    source_index: 3
    name: Paper & Cardboard  # Change this to whatever you want the UI to display
    details_format: generic
    date_template: '{{value.date.strftime("%A %d %B %Y")}}'  # date format becomes 'Tuesday 1 April 2022'
    value_template: 'in {{value.daysTo}} days'
    types: "Paper & Cardboard"  

but in the entities it doesnt connect to the calendar to show when next schedule is…?

image

This is how my config looks like:
configutation:

waste_collection_schedule:
  sources:
    - name: ics
      args:
        file: "www/calendar-Abfall.ics"
      customize:
        - type: Abfuhr Papier
          alias: Papiermüll
          icon: mdi:paperclip
          picture: '/local/icons/papier.png'
        - type: Abfuhr Leichtverpackungen
          alias: Gelber Sack
          icon: mdi:recycle
          picture: '/local/icons/gelbersack.png'
        - type: Abfuhr Restabfall
          alias: Restmüll
          icon: mdi:trash-can
          picture: '/local/icons/rest.png'
      calendar_title: Abfall
  fetch_time: "04:00"
  day_switch_time: "18:00"

sensor:

- platform: waste_collection_schedule
  name: abfall.rest
  details_format: "upcoming"
  value_template: '{{value.date.strftime("%A, %d.%B")}}|{{value.date.strftime("%d.%m.%Y")}}|{{value.date.strftime("%u")}}'
  date_template: '{{value.date.strftime("%d.%m.%Y")}}'
  add_days_to: True
  count: 2
  types:
    - "Restmüll"

I got all my different types in one *.ics file, if that matters.

ok modified your code to

waste_collection_schedule:
    sources:
    - name: bromley_gov_uk
      args:
        uprn: 123456
        property: 123456
        
        
      customize:
        - type: Abfuhr Papier
          alias: Papiermüll
          icon: mdi:paperclip

        - type: Abfuhr Leichtverpackungen
          alias: Gelber Sack
          icon: mdi:recycle

        - type: Abfuhr Restabfall
          alias: Restmüll
          icon: mdi:trash-can

  
sensor:
    - platform: waste_collection_schedule
      name: waste-test
      details_format: "upcoming"
      value_template: '{{value.date.strftime("%A, %d.%B")}}|{{value.date.strftime("%d.%m.%Y")}}|{{value.date.strftime("%u")}}'
      date_template: '{{value.date.strftime("%d.%m.%Y")}}'
      add_days_to: True
      count: 2
      types:
        - "Restmüll"  

sensor doesnt even show up now.

Also in the dev notes it says

hacs_waste_collection_schedule/bromley_gov_uk.md at master · mampfes/hacs_waste_collection_schedule (github.com)

property: PROPERTY_ID

but in the example it says

 uprn: 6296702

so which one is it?!?!?

im now getting this from excatly the same code that was working above

with your original code you had at least those entries. My guess is you only need to adjust the sensors. Revert back to your original configuration with property: 123456 and check again.
Your configuration collected all entries, only the splitting in different sensors was missing. That should be accomplished by using type: “entry name” in your sensor.

ok i have it working again so far im here with this code

waste_collection_schedule:
    sources:
    - name: bromley_gov_uk
      args:
        property: 123456


#Garden Waste Sensors
    - platform: waste_collection_schedule
      source_index: 0
      name: Rubbish  # Change this to whatever you want the UI to display
      details_format: generic
      date_template: '{{value.date.strftime("%A %d %B %Y")}}'  # date format becomes 'Tuesday 1 April 2022'
      value_template: 'in {{value.daysTo}} days'
      types:
        - Food Waste
        - Garden Waste

it can see the council calendar and is pulling data…

i just cant work out how to split that data up into “rubbish, carboard etc” as per the council site.

WasteWorks (bromley.gov.uk)

which gives me these entities

Preume i should have a sensor for each item 1 for carboard, 1 for rubbish and 1 for garden?