Correct the only thing now possible is to really exclude the âtodays pickup typeâ
Meaning you would only see 2 type in the next pick up days part.
Edit:
Alho we do have trash_first_next_date and sensor.trash_first_next_item
But that would be really hard putting it altogether in the auto sorting part
and no, that isnt really an option since it would have to be conditional for having a todaysâ pickup. And would require yet again an extra binary_sensor on which we could do that. Even so, if we had it, we wouldnât have the next 4 dates for the various trash-types.
@Mariusthvdb
With the help of a friend i got it finally the way i like it.
There are only 2 sensors that i cannot get working.
First 1 is: sensor.trash_next_icon
I think i should be using this for it but when i add it to sensors it gives me errors (invalid slug) and adding it to customize.yaml doesnât do anything.
sensor.trash_next:
friendly_name: Days to next pickup
templates:
icon: >
if (state === âGeenâ) return âmdi:calendar-questionâ;
if (state === â0â || state === â1â || state === â2â || state === â3â || state === â4â
|| state === â5â || state === â6â || state === â7â || state === â8â || state === â9â)
return âmdi:numeric-â + state + â-box-multiple-outlineâ;
return âmdi:numeric-9-plus-box-multiple-outlineâ;
And the second missing sensor is: sensor.trash_color
I found some old post (âmarkdown-card-with-template-wont-format-correctlyâ) but cannot figure out how to fit this in my setup.
dont know what your setup looks like, so not sure where you need help.
both sensors you mention above are standalone, and not parts of the template sensor you quote. Ive also added the trash_next_color, to use that in the markdown (and custom-header tab icon )
trash_next_icon:
value_template: >
{% set days = states('sensor.saver_trash_first_next_in_days') %}
{% if days != 'Geen' %}
{% if days <= '9'%} mdi:numeric-{{days}}-box-multiple-outline
{% else %} mdi:numeric-9-plus-box-multiple-outline
{% endif%}
{% else %} mdi:checkbox-blank-outline
{% endif %}
trash_next_color:
value_template: >
{% set next = states('sensor.saver_trash_first_next_item') %}
{% set mapper = {'papier':'#00b2ef',
'gft':'green',
'pbd':'orange',
'restafval':'black'} %}
{% set color = mapper[next] if next in mapper else 'grey' %}
{{color}}
trash_color:
value_template: >
{% set vandaag = states('sensor.saver_trash_today') %}
{% set mapper = {'papier':'#00b2ef',
'gft':'green',
'pbd':'orange',
'restafval':'black'} %}
{% set color = mapper[vandaag] if vandaag in mapper else 'grey' %}
{{color}}
Note I have prefixed all my senors with saver_ so if you dont use that, take it out of the templates.
sure, but that would be useful for changing the icon of another sensor to show in the frontend. You can see here how to do that.
My sensor above is a template sensor with a value_template for the icon. This sensor isnât used in the frontend itself, it is used in the markdown card to show an icon here:
I do that in places where the config of the markdown card, or other style sections would become to complicated and error prone, let alone difficult to read. using the state of this sensor is hassle free.
update
to illustrate what is happening even better, please see below. We have a pickup today: Papier.
the next_pickup_in_days shows todays pickup ( 0 days) ,
I have a little problem with showing the first next item.
The sensor sensor.trash_first_next_item only shows one item, but there are two pickups at that day (wo 17 jun).
Is there any way to show them both, instead of ârestafvalâ, ârestafval, gftâ, just like sensor.trash_tomorrow does?
do we have a bug, a Saver issue, or has the trash type been changed?? My regular Saver app still shows GFT, so I dont understand whatâs happening hereâŚ
This add on seems to break my HA when installing through HACS. It appears to be overwriting/removing/replacing files in the âcustom_componentsâ directory and as a result HACS is corrupted causing HA to throw a fit when starting. Tried this on 2 individual HA installs and both ran into problems.