Garbage Collection - recommendations for replacement of Bruxy integration

Because my garbage collection always falls on recycling or green waste day. So I only need those two. If the sensor says “green waste tomorrow” I send a reminder that it is garbage and green waste day tomorrow. Likewise for recycling.

The calendar colours are not user definable.

Not sure why the colors are not user definable as this is a standard feature of the Google calendar?

Did you create a card on your desktop that shows these triggers? I have 4 different pickups and I had on my desktop icons that changed colors depending on how many days until the pickup and the icon showing the number of days. This was very useful at a glance.

I tried almost the same code as you used above (renaming the calendar card names) and I get for my sensor.garbage_pickup - State unknown. It should show my recycle as it is in the calendar for tomorrow.

What happens if you have two different pickups on the same day? I.e Yard waste and Garbage?

I have use conditional cards based on the state of this sensor to display images in my reminder card.

As I said I always have two pickups on the same day, garbage and either green waste or recycling.

I have followed
https://community.home-assistant.io/t/template-guide-days-away-from-calendar-event/211209/47
and created all my sensors. Is there any recommended card to use for the garbage collection? I have not been able to use the custom garbage collection card (yet). Not displaying correctly.
Thanks.

1 Like

I am looking too.

Have you taken a look at this custom_component?

I and a lot of others highly recommend it. :wink: It’s great and the support thread here in this forum is very well maintained.

1 Like

All i need was only this card, its perfect size for my Dwain Dashboard. :grinning:

I finally have everything working again as before thanks to help from many. I am posting my yaml files to help others. I believe the Waste_collection_schedule documentation needs some help. No where near as hard. Template sensors were not needed for me.
I have static sensors

waste_collection_schedule:
  sources:
    - name: static
      calendar_title: Garbage-Pickup
      args:
        type: Garbage
        frequency: WEEKLY
        weekdays: {MO, TH}
    - name: static
      calendar_title: Yard-Pickup
      args:
        type: Yard
        frequency: WEEKLY
        weekdays: MO
    - name: static
      calendar_title: Recycle-Pickup
      args:
        type: Recycle
        frequency: WEEKLY
        weekdays: WE
    - name: static
      calendar_title: Branches-Pickup
      args:
        type: Branches
        frequency: WEEKLY
        weekdays: TU
sensor:
# next garbage collection
  - platform: waste_collection_schedule
    name: garbage_col
    source_index: 0
    details_format: generic
    add_days_to: true
    value_template: "{{ value.daysTo }}"
    types:
      - Garbage
# next yard waste collection
  - platform: waste_collection_schedule
    name: yard_waste_col
    source_index: 1
    details_format: generic
    add_days_to: true
    value_template: "{{ value.daysTo }}"
    types:
      - Yard
# next recycle_collection
  - platform: waste_collection_schedule
    name: recycle_col
    source_index: 2
    details_format: generic
    add_days_to: true
    value_template: "{{ value.daysTo }}"
    types:
      - Recycle

# next branches collection
  - platform: waste_collection_schedule
    name: branches_col
    source_index: 3
    details_format: generic
    add_days_to: true
    value_template: "{{ value.daysTo }}"
    types:
      - Branches

My Lovelace card:

  -
    cards:
      - entity: sensor.garbage_col
        source: 'hacs_waste_collection_schedule'
        icon_color: brown
        due_1_color: brown
        due_color: red
        icon_size: 35px
        title: Garbage
        type: 'custom:garbage-collection-card'
      - entity: sensor.yard_waste_col
        source: 'hacs_waste_collection_schedule'
        icon_color: yellow
        due_1_color: yellow
        due_color: red
        icon_size: 35px
        type: 'custom:garbage-collection-card'  
      - entity: sensor.recycle_col
        source: 'hacs_waste_collection_schedule'
        icon_color: blue
        due_1_color: blue
        due_color: red
        icon_size: 35px
        type: 'custom:garbage-collection-card'  
      - entity: sensor.branches_col
        source: 'hacs_waste_collection_schedule'
        icon_color: green
        due_1_color: green
        due_color: red
        icon_size: 35px
        type: 'custom:garbage-collection-card'
    type: vertical-stack

image

Hope this helps others.

2 Likes

Tried but with the google calendar method this doesn’t work.

I am not using the google calendar method.

I don’t understand why it won’t create this garbage card like you had when using google calendar. It should be easy.

I believe the calendar doesn’t make the necessary attributes that the card needs.

All attributes working correctly. Only garbage card wont show number.2023-06-04 10_44_23-Dwains Dashboard – Home Assistant

Here is mine from the waste collection schedule integration: As I said you do not get all the attributes from the calendar.

Yeah, but only attributes what needs to be displayed is “days left”.
That is available and is shown in states. The only problem is when I use this in garbage card then it wont show “days left” number.2023-06-05 10_38_36-Dwains Dashboard – Home Assistant

I tried the calendar and could not get it to work. I opened a GitHub issue with the coder of the card.
Please follow here. Not sure what else I can tell you.

I’m a bit late to the party, but this might be useful info.

On YouTube, Bruxy explains how to make a sensor template for state (to change icon color and/or text) and days remaining. The rest is using the capabilities of calendar and a card to display the collection info. Shifting pickup dates due to holidays can easily be done via the calendar GUI.

https://www.youtube.com/watch?v=RpwAhy7f52I

image

2 Likes

Hi, i have the same problem for the configuration with 4 static sources, and only one is working.

the waste_collection.yaml is like:

sources:
  - name: static
    calendar_title: Altpapier
    args:
      type: Altpapier
      frequency: WEEKLY
      interval: 4
      start: "2023-01-11"
    customize:
      - type: Altpapier
        icon: mdi:trash-can
  - name: static
    calendar_title: Biomuell
    args:
      type: Biomuell
      frequency: WEEKLY
      interval: 1
      start: "2023-01-05"
    customize:
      - type: Biomuell
        icon: mdi:flower-outline
  - name: static
    calendar_title: GelberSack
    args:
      type: GelberSack
      frequency: WEEKLY
      interval: 6
      start: "2023-02-17"
      weekdays: FR
    customize:
      - type: GelberSack
        icon: mdi:recycle
  - name: static
    calendar_title: Restmuell
    args:
      type: Restmuell
      frequency: WEEKLY
      interval: 2
      start: "2023-01-05"
    customize:
      - type: Restmuell
        icon: mdi:trash-can

and the sensor’s are like: ( i have the sensors in a seperate directory, so it looks a bit diffrent to you)

platform: waste_collection_schedule
name: next_Muell
source_index: [0, 1, 2, 3]
details_format: "upcoming"
value_template: "{% if value.daysTo == 0 %}Heute{% elif value.daysTo == 1 %}Morgen{% else %}in {{value.daysTo}} Tagen{% endif %}"
platform: waste_collection_schedule
name: Altpapier
source_index: 0
details_format: "upcoming"
value_template: "{% if value.daysTo == 0 %}Heute{% elif value.daysTo == 1 %}Morgen{% else %}in {{value.daysTo}} Tagen{% endif %}"
types:
  - Altpapier
platform: waste_collection_schedule
name: Biomuell
source_index: 1
details_format: "upcoming"
value_template: "{% if value.daysTo == 0 %}Heute{% elif value.daysTo == 1 %}Morgen{% else %}in {{value.daysTo}} Tagen{% endif %}"
types:
  - Biomuell
platform: waste_collection_schedule
name: GelberSack
source_index: 2
details_format: "upcoming"
value_template: "{% if value.daysTo == 0 %}Heute{% elif value.daysTo == 1 %}Morgen{% else %}in {{value.daysTo}} Tagen{% endif %}"
types:
  - GelberSack
platform: waste_collection_schedule
name: Restmuell
source_index: 3
details_format: "upcoming"
value_template: "{% if value.daysTo == 0 %}Heute{% elif value.daysTo == 1 %}Morgen{% else %}in {{value.daysTo}} Tagen{% endif %}"
types:
  - Restmuell

i don’t know where my issue is ?

Did you try my setup above? I have not issues since I changed to it. If that works, then try modifying it. It took me awhile to get it to work correctly.

i have now recreated your config and it works. i am now testing step by step what the problem could be. unfortunately you don’t use a date as the start date and what annoys me is that i have to restart the server every time to get a result. it just takes a really long time…