Custom component Afvalbeheer - Support for multiple waste collectors

This address only has GFT en Restafval, no paper waste collection

Bummer, must be something at their end.

Hello,

The site of https://www.ophaalkalender.be has changed to https://recycleapp.be/, so the integration is not working anymore.
First is a problem of certificate coming, and changing the site name it’s a fetch problem.
Could you please fix it?

Just changing the address is not working, they changed the site content as well.
thanks

Correct, the collection calendar from ophaalkalender.be are no longer work.
Would it be possible to fix them?
ophaalkalender

I’m aware. Working on a fix

@Tommy_Lecossois @Rosenwasser

Are you willing to test the beta?
Replace the contents of sensor.py with the contents of this link.
Config of the sensor should look something like this:

  - platform: afvalbeheer
    wastecollector: recycleapp
    resources:
      - restafval
    postcode: ####
    streetnumber: #
    streetname: ######
    printwastetypes: 1 #optional; this will create a persistent notification with all possible fractions for your address on restart of HA
3 Likes

For me, it’s working

image

1 Like

Hi Pippyn,

Yes, I want to test this for sure.
I changed the code and for me it is working like a charm !
The dates are all correct.

Maybe too much to ask but would there also be an option to:

  1. blink option for te Today and Tomorrow sensor
  2. integrate an after-tomorrow sensor?

Best regards,
Benny

works, but gemengde plastics is missing a standard icon

edit:

seems they have added new categorie

normal collection huisvuil

I found an issue with the access token. So your sensors might fail in the coming hours. I’m working on a fix.

@elRadix fixed in the next version

1 Like

Working well!
thanks a lot!!!

Please use the same link and replace the code of sensor.py again to use beta2.

Updates in version beta2:

  • Better error handling
  • Issue with accessToken fixed
  • Support for the Gemengde plastics icon
  • Support for the fraction Grof afroep

Please keep me posted on any issues please

now gemengde plastics is not showing up and the sensor state is unknown

Available waste types: grofvuil, papier, pmd, restafval, takken

My bad!
Please change line 995 of sensor.py from
'gemengde': WASTE_TYPE_PACKAGES,
to
'gemengde': WASTE_TYPE_PLASTIC,

did it, no change and icon not showing up

Dm me your config (including address) then I’ll have a look what’s going on

I am trying to flash an image when the collection day is today, however I am unable to do so.
Who can put me on the right track?
Today it is the collection of ‘pmd’

entities:
  - card_type: horizontal-stack
    cards:
      - entity: sensor.recycleapp_vandaag
        name: Morgen
        show_state: false
        state_image:
          Geen: /local/foto/container-geen-ophaling.jpg
          gft: /local/foto/container-grijs.jpg
          glas: /local/foto/container-blauw.jpg
          papier: /local/foto/container-geel.jpg
          'papier, glas': /local/foto/container-blauw-geel.jpg
          pmd: /local/foto/zak-blauw.jpg
          restafval: /local/foto/zak-groen.jpg
          'restafval, gft': /local/foto/restafval-GFT.jpg
        style: |
          ha-card {
            animation: {% if is_state('sensor.recycleapp_vandaag', 'pmd') %} 
                         blink 2s linear infinite;
                       {% else %} 
                         none
                       {% endif %}
                  }
            @keyframes blink {
              50% {opacity: 0;}
              }
        type: picture-entity
    type: 'custom:hui-element'
type: entities

@Rosenwasser @elRadix @Tommy_Lecossois @francisp

Please update sensor.py again with the new beta (same link) as this fixes a major issue with the access token.

Please keep me posted on any issues.

2 Likes

Hello,
no problem, working well so far.

Hello,
I think there is something wrong in your hui-element.

this code works well :slight_smile:

cards:
  - cards:
      - entity: sensor.vandaag
        state_image:
          None: local/poubelle/Geen.png
          gft: local/poubelle/GFT.png
          papier: local/poubelle/Papier.png
          pmd: local/poubelle/PMD.png
          restafval: local/poubelle/Restafval.png
        style: |
          ha-card {
            animation: {% if is_state('sensor.vandaag', 'None') %} 
                         blink 2s linear infinite;
                       {% else %} 
                         none
                       {% endif %}
                  }
            @keyframes blink {
              50% {opacity: 0;}
              }
        type: picture-entity
    type: horizontal-stack
type: 'custom:vertical-stack-in-card'