Something I would like to know. How can I change the config of the Integration? Say I would move house and I would change my address or even more. I canât find a way to do so. Or what if you would like âinclude Todayâ to be true instead of false.
This is indeed the case. I changed the automation condition to âgeenâ and notifications for âGeenâ are no longer showing.
There were more changes I needed to make that were cese sensitive related. Found them all (at least the ones I use )
I believe these were some:
Pmd instead of PMD
Papier instead of papier
Plastic instead of plastic
Itâs pretty straightforward.
- Remove the exisiting configuration first (settings, devices & services, afvalwijzer, click on the 3 vertical aligned dots, delete(
- Add your new configuration (same page, but at the bottom hit add entry).
Iâve tried to make the config editable, there are some issues currently. Maybe in a future release I`ll introduce this option again.
Ouch, this is important for me to know. I once decided to lowercase all waste types. If this is not the case now, weâre dealing with a bug. The sensor waste types should always be lowecase like:
- pmd
- papier
- plastic
Etc. Let me know if this isnât the case now. Then I need to look into it. For mijnafvalwijzer itâs working fine at least, I checked it after seeing this post.
Most of the issues were in the dashboard. Not the sensors themselves. The sensors themselves are all lowercas as they should be. But in the dashboard the results that the sensors show, are different to the results before the big overhaul of the integration.
I still had a test dashboard that was not working so here is an example:
How it was:
type: picture-entity
entity: sensor.afvalwijzer_today
name: Vandaag
state_image:
gft: /local/mijnafvalwijzer/gft3.png
papier: /local/mijnafvalwijzer/papier3.png
pmd: /local/mijnafvalwijzer/plastic3.png
Geen: /local/mijnafvalwijzer/kliko3.png
How the code is now:
type: picture-entity
entity: sensor.afvalwijzer_today
name: Vandaag
state_image:
Gft: /local/mijnafvalwijzer/gft3.png
Papier: /local/mijnafvalwijzer/papier3.png
Pmd: /local/mijnafvalwijzer/plastic3.png
geen: /local/mijnafvalwijzer/kliko3.png
I donât know if all is correct yet, that is something I will know next week when all different types of waste have been collected
So this was the view before the changes (with the new integration installed)
Here you can see gft was in lowercase and in the screenshot of the result you can see that it is now written as Gft. Geen has changed to all lowercase and Pmd is now with a capital P instead of fully lowercase (same as Gft). Also the papier sensor changed to sensor.afvalwijzer_oud_papier_en_karton instead of sensor.afvalwijzer_papier.
And here after the changes. Only thing in this view that also changed for me, is the sensors donât respond with a Date but report only âNext weekâ or âIn x weeksâ. Iâm still figguring out how to change that back. (ROVA, Amersfoort)
I hope this helps
Oke, if the sensors show it lowercase then the component is working fine . You probably have a template somewhere to change the case, it could be you need to update some things. I have this at least
- platform: template
sensors:
afvalwijzer_next_item_formatted:
value_template: >-
{% if is_state('sensor.afvalwijzer_next_item', 'gft') %}GFT
{% elif is_state('sensor.afvalwijzer_next_item', 'papier') %}Papier
{% elif is_state('sensor.afvalwijzer_next_item', 'pmd') %}PMD
{% elif is_state('sensor.afvalwijzer_next_item', 'restafval') %}Restafval
{% else %}Geen
{% endif %}
friendly_name: "Next pickup item"
afvalwijzer_today_formatted:
value_template: >-
{% if is_state('sensor.afvalwijzer_today', 'gft') %}GFT
{% elif is_state('sensor.afvalwijzer_today', 'papier') %}Papier
{% elif is_state('sensor.afvalwijzer_today', 'pmd') %}PMD
{% elif is_state('sensor.afvalwijzer_today', 'restafval') %}Restafval
{% else %}Geen
{% endif %}
friendly_name: "Vandaag"
afvalwijzer_tomorrow_formatted:
value_template: >-
{% if is_state('sensor.afvalwijzer_tomorrow', 'gft') %}GFT
{% elif is_state('sensor.afvalwijzer_tomorrow', 'papier') %}Papier
{% elif is_state('sensor.afvalwijzer_tomorrow', 'pmd') %}PMD
{% elif is_state('sensor.afvalwijzer_tomorrow', 'restafval') %}Restafval
{% else %}Geen
{% endif %}
friendly_name: "Morgen"
afvalwijzer_day_after_tomorrow_formatted:
value_template: >-
{% if is_state('sensor.afvalwijzer_day_after_tomorrow', 'gft') %}GFT
{% elif is_state('sensor.afvalwijzer_day_after_tomorrow', 'papier') %}Papier
{% elif is_state('sensor.afvalwijzer_day_after_tomorrow', 'pmd') %}PMD
{% elif is_state('sensor.afvalwijzer_day_after_tomorrow', 'restafval') %}Restafval
{% else %}Geen
{% endif %}
friendly_name: "Overmorgen"
For the showing of âNext weekâ etcetera instead of a date, look at this piece of code (mainly, the format: date option) :
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
Papier: /local/afvalwijzer/Papier.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
Papier: /local/afvalwijzer/Papier.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
Papier: /local/afvalwijzer/Papier.png
Restafval: /local/afvalwijzer/Restafval.png
type: picture-entity
type: horizontal-stack
- type: custom:auto-entities
card:
type: glance
filter:
exclude:
- entity_id: sensor.afvalwijzer_*next*
- entity_id: sensor.afvalwijzer_day_after_tomorrow*
- entity_id: sensor.afvalwijzer_today*
- entity_id: sensor.afvalwijzer_tomorrow*
- entity_id: sensor.afvalwijzer_kerstbomen*
- entity_id: sensor.afvalwijzer_*orgen
- entity_id: sensor.afvalwijzer_van*
include:
- entity_id: sensor.afvalwijzer_*
options:
format: date
sort:
method: state
- entities:
- style:
background: "#62717b"
height: 1px
margin-left: auto
margin-right: auto
type: divider
type: entities
- type: markdown
content: >-
<center>De volgende leging is {{ states('sensor.afvalwijzer_next_type')
}}. Dat is over {{ states('sensor.afvalwijzer_next_in_days') }} {% if
is_state('sensor.afvalwijzer_next_in_days', '1') %}dag{% else %}dagen{%
endif %}.</center>
- entities:
- style:
background: "#62717b"
height: 1px
margin-left: auto
margin-right: auto
type: divider
- entity: input_boolean.waste_moved
- entity: input_boolean.waste_reminder
show_header_toggle: false
type: entities
state_color: false
type: custom:stack-in-card
Finaly, the middle one is missing as the papier sensor changed to âoud_papier_en_kartonâ. This is not due to the component, but due to the fact mijnafvalwijzer has changed the name for it in your environment. This happens more often. If you would like to see it as papier again, you can create a PR here:
Or ofcourse you can request it in an issue on Github. Easy to do.
For the date formatting in Dutch you also need to do something like this:
- platform: template
sensors:
afvalwijzer_gft_formatted:
friendly_name: "GFT"
value_template: "{{ as_timestamp(states['sensor.afvalwijzer_gft'].state) | timestamp_custom('%d-%m-%Y') }}"
entity_picture_template: /local/afvalwijzer/GFT.png
afvalwijzer_papier_formatted:
friendly_name: "Papier"
value_template: "{{ as_timestamp(states['sensor.afvalwijzer_papier'].state) | timestamp_custom('%d-%m-%Y') }}"
entity_picture_template: /local/afvalwijzer/Papier.png
afvalwijzer_pmd_formatted:
friendly_name: "PMD"
value_template: "{{ as_timestamp(states['sensor.afvalwijzer_pmd'].state) | timestamp_custom('%d-%m-%Y') }}"
entity_picture_template: /local/afvalwijzer/PMD.png
afvalwijzer_restafval_formatted:
friendly_name: "Restafval"
value_template: "{{ as_timestamp(states['sensor.afvalwijzer_restafval'].state) | timestamp_custom('%d-%m-%Y') }}"
entity_picture_template: /local/afvalwijzer/Restafval.png
Then you can use those with something like this in lovelace:
type: custom:auto-entities
card:
type: glance
filter:
include:
- entity_id: sensor.afvalwijzer_*_formatted
Result:
Just as an exampleâŚ
Tnx! I will play arround with all this!
Another observation, Iâm missing sensor.afvalwijzer_next_item in my envrionment. Is that expected (it was there before the big change to the integration).
That doensât exist for quiet some time anymore:
afvalwijzer_next_type
Is the new name
please see this:
- unique_id: volgende_afval_ophaal_dag
state: >
{% set next = states('sensor.afvalwijzer_next_date') %}
{% set dt = next|as_datetime %}
{% from 'easy_time.jinja' import month, weekday %}
{% set dag = weekday(dt.isoweekday()) %}
{% set datum = dt.day %}
{% set maand = month(dt.month) %}
{{dag}} {{datum}} {{maand}}
given the fact jinja templates cant be translated directly, we now use the custom_templates easy_time by Petro.
this allows you to set a default language, and all subsequent entities you use the easy_time in will be in your set language perfectly. Highly recommended!
I was triggered by your example
This is one awesome card. But Iâm having a bit of difficulty with all the code, templating cards etc etc. Could you paste the yaml code for this card?
If I ever completely figure out how to get here Iâll write a step by step afvalwijzer integration for dummies installation
Why when i past this in to my dashboard i get No type specified
- type: custom:auto-entities
card:
type: glance
filter:
exclude:
- entity_id: sensor.afvalwijzer_next
- entity_id: sensor.afvalwijzer_day_after_tomorrow*
- entity_id: sensor.afvalwijzer_today*
- entity_id: sensor.afvalwijzer_tomorrow*
- entity_id: sensor.afvalwijzer_kerstbomen*
- entity_id: sensor.afvalwijzer_orgen
- entity_id: sensor.afvalwijzer_van
include:
- entity_id: sensor.afvalwijzer_*
options:
format: date
sort:
method: state - entities:
- style:
background: â#62717bâ
height: 1px
margin-left: auto
margin-right: auto
type: divider
type: entities
- style:
- type: markdown
content: >- De volgende leging is {{ states('sensor.afvalwijzer_next_type') }}. Dat is over {{ states('sensor.afvalwijzer_next_in_days') }} {% if is_state('sensor.afvalwijzer_next_in_days', '1') %}dag{% else %}dagen{% endif %}.
there is no âthis cardâ, except if you mean this Garbage pickup date (mijnafvalwijzer.nl) custom_component - #1023 by xirixiz, which was posted only a few posts above yoursâŚ
everyone can create the card they like to show things in the Dashboard
all of the examples above have been shared numerous times, so maybe first check the posts above, and then return with any questions left?
we can Not see what you do if you dont format the yaml correctly, please format it using the </> button in the editor, or using 3 so called backticks before and after your yaml, like this one:
`
see: How to help us help you - or How to ask a good question
This is the on on his github page but to walk true a topic with 1k of messages is not easy, so i found on a few message above that work half, i see dates but i also found out that with what i had, and what i see now that text change in scripts like bolean.trash is now bolean.waste and that make things also not work. So it would be fine if i know were to find these files compiled if this is possible. that we use no today, because i found old ones and new ones. I have a clean install of home assistant just for testing.
From noting to this
if you check the integration panel config/integrations/integration/afvalwijzer you can click the entities, and see the exact names/entity_idâs in your system
with those, you can make the Dashboard cards.
Now of course, you might also need to change things in the yaml configuration of automations and maybe template sensors.
I toke the scripts from message 1004 and thing some from message 1002 the have different map for pictures, also some entrities were wrong so afther some changes in that and place of yaml files it got to live, only strange part i canât figure out yet is why on the sencond row i had 3 items and now 4 but the 4th does not work. We only have 3 different kinds of waist we dont have PMD
you probably didnt filter out the other sensor entities the integration also creates.
check, itâs not a waste type sensor, but the count of the days sensor.
Itâs what @Mariusthvdb says indeed. You need to update your exclusion or inclusion filter. For example.
- type: custom:auto-entities
card:
type: glance
filter:
exclude:
- entity_id: sensor.afvalwijzer_day*
Full example of code I`m using for this specific part:
- type: custom:auto-entities
card:
type: glance
filter:
exclude:
- entity_id: sensor.afvalwijzer_*next*
- entity_id: sensor.afvalwijzer_day_after_tomorrow*
- entity_id: sensor.afvalwijzer_today*
- entity_id: sensor.afvalwijzer_tomorrow*
- entity_id: sensor.afvalwijzer_kerstbomen*
- entity_id: sensor.afvalwijzer_*orgen
- entity_id: sensor.afvalwijzer_van*
include:
- entity_id: sensor.afvalwijzer_*_formatted
options:
format: date
sort:
method: state