Garbage pickup date (mijnafvalwijzer.nl) custom_component

Hahaha, to be honest, I don’t know anymore. In the very beginning I’ve added it and never had to touch it again. I believe it had something todo with the ios platform back then. I don’t think it’s still needed.

1 Like

Anoyone got an idea why the top 3 buttons are reloading and not showing anything?

Hi, it means you’re missing a mod (installable via HACS.

@xirixiz I got this plugin running already (HACS installed)

image

in my configuration.yaml:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes
  extra_module_url:
    - /hacsfiles/lovelace-card-mod/card-mod.js

Hmm, I don’t know this plugin well. Maybe better to reach out to the creator itself (via Github maybe). This is not related to the afvalwijzer component, as the data is shown in hass.

But looking at the example config and the url you are using, there is a mismatch. Use the local url instead.

Seems to be a small issue in the vertical stack code. The state_image is with capital letter. Should be small letters (all). That fixed it.

type: picture-entity
entity: sensor.afvalwijzer_today
show_name: true
show_state: false
state_image:
  gft: /hacsfiles/afvalwijzer/GFT.png
  geen: /hacsfiles/afvalwijzer/Geen.png
  pmd: /hacsfiles/afvalwijzer/PMD.png
  papier: /hacsfiles/afvalwijzer/Papier.png

So I have used this integration to learn a lot more about HA and how certain things work like sensors and automations. Also HACS was new for me, and that came along also. Many thanks to (especially) @xirixiz for your work on the integration, and the patience you have for questions from people who are just starting out!

I have tried to adjust the card on my dashboard to suit my personal taste a bit better, and wanted to give this back to you all. Perhaps someone likes this, and wants to use parts of it. The changes I made are really simple. I like the simplistic images of a garbage can on a coloured background more than the images of the garbage-type themselves, so I created one for PMD since the orange background was missing. I also created a new image (the HA-logo in black/grey) for the days where there is no garbage pickup. My wife found the images for “no pickup” and “restafval” too much alike.

I also used a custom (HACS) card to replace the vertical stack, so everything looks literally as 1 card.

the result:
waste-card

The code:

cards:
  - cards:
      - entity: sensor.afvalwijzer_today_formatted
        show_name: true
        show_state: false
        state_image:
          GFT: /local/afvalwijzer/GFT.png
          Geen: /local/afvalwijzer/Geen.png
          PMD: /local/afvalwijzer/PMD.png
          Restafval: /local/afvalwijzer/Restafval.png
        type: picture-entity
      - entity: sensor.afvalwijzer_tomorrow_formatted
        show_name: true
        show_state: false
        state_image:
          GFT: /local/afvalwijzer/GFT.png
          Geen: /local/afvalwijzer/Geen.png
          PMD: /local/afvalwijzer/PMD.png
          Restafval: /local/afvalwijzer/Restafval.png
        type: picture-entity
      - entity: sensor.afvalwijzer_day_after_tomorrow_formatted
        show_name: true
        show_state: false
        state_image:
          GFT: /local/afvalwijzer/GFT.png
          Geen: /local/afvalwijzer/Geen.png
          PMD: /local/afvalwijzer/PMD.png
          Restafval: /local/afvalwijzer/Restafval.png
        type: picture-entity
    type: horizontal-stack
  - type: custom:auto-entities
    card:
      type: glance
    filter:
      include:
        - entity_id: sensor.afvalwijzer_gft
        - entity_id: sensor.afvalwijzer_pmd
        - entity_id: sensor.afvalwijzer_restafval
    sort:
      attribute: days_until_collection_date
      method: attribute
      numeric: true
  - type: markdown
    content: >-
      <center>De volgende leging is {{
      states('sensor.afvalwijzer_next_item_formatted') }}. Dit is over {{
      states('sensor.afvalwijzer_next_in_days') }} {% if
      is_state('sensor.afvalwijzer_next_in_days', '1') %}dag{% else %}dagen{%
      endif %}.</center> 
  - entities:
      - entity: input_boolean.waste_moved
      - entity: input_boolean.waste_reminder
    show_header_toggle: false
    type: entities
    state_color: false
type: custom:stack-in-card

If someone wants something else from my setup, just let me know!

1 Like

Thanks for sharing this @Hobbybob! Always good to see ppl have their own way of presenting data. I do like your view btw! Maybe you can share the icons as well here, so ppl can copy those. I can also add those to the repo so others have the ability to choose. Anyway, nice work!

Sure, no problem!

As said, the ones for the green and black garbage-bins I got from here, so they are the same as already shared before. I coloured the orange bin, and a “dark-on-dark” version of the HA-logo for when there is no pickup.

Geen
GFT
PMD
kliko_geen

1 Like

Hi All,
I installed the 2024-01-06 version of Afvalwijzer this morning. I added the required code to the configuration.yaml and restarted Home Assistant.
Unfortunately I do not see any sensors appearing. A little advice would be appreciated.

show us what you added and how?

# Afvalwijzer
sensor:
  - platform: afvalwijzer
    provider: mijnafvalwijzer
    postal_code: 8253HA
    street_number:  18
    suffix: ''
    exclude_pickup_today: true
    default_label: geen
    id: ''
    exclude_list: ''

if these are your actual postcode and number, please edit…

can you enter this in the dev tools template editor:

{{integration_entities('afvalwijzer')}}

and report what is returned?

And if they are, they are not know at mijnafvalwijzer.nl … so you probably need to specify another provider.

If you did use your real address, I noticed the used street number isn’t know. Please use number 13, 15 ,17 or 19. Could be you live on a new address which isn’t know yet by your waste provided.

If you provided your real adress, then mijnafvalwijzer is at least the correct waste provider.

This template does not listen for any events and will not update automatically.

No HA would probably odd numbers instead of even. I did not use my real number

Can you validate the info you use in hass here: https://www.mijnafvalwijzer.nl/

There it finds my zipcode and number.

Can you share the output of the logfiles?

Do you see the below at least in your logfiles?
If so, then there should be an error somewhere in the logs.
If not, then the platform isn’t being loaded and sometheing is wrong with your confiuguration.

-------------------------------------------------------------------,
Afvalwijzer - 2024.1.7b0,
This is a custom integration!,
If you have any issues with this you need to open an issue here:,
https://github.com/xirixiz/homeassistant-afvalwijzer/issues,
-------------------------------------------------------------------, 

I do not see any errors in the logs but it appears as if the component/platform is not loaded.
I have no clue where to search for to get this working then. There are no errors found in the yamls.

This is the only thing I found in the logs:
2024-01-29 10:53:30.997 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration afvalwijzer which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

Versions
Core: 2024.1.5
Frontend: 20240104.0