sure, here you go:
- platform: template
sensors:
restafval:
friendly_name: 'Restafval'
value_template: >
{{ as_timestamp(strptime(states('sensor.trash_restafval'), '%d-%m-%Y')) | timestamp_custom('%d %B') }}
plastic_verpakkingsafval:
friendly_name: 'Plastic'
value_template: >
{{ as_timestamp(strptime(states('sensor.trash_plastic'), '%d-%m-%Y')) | timestamp_custom('%d %B') }}
gft:
friendly_name: 'Gft'
value_template: >
{{ as_timestamp(strptime(states('sensor.trash_gft'), '%d-%m-%Y')) | timestamp_custom('%d %B') }}
papier:
friendly_name: 'Papier'
value_template: >
{{ as_timestamp(strptime(states('sensor.trash_papier'), '%d-%m-%Y')) | timestamp_custom('%d %B') }}
gft_formatted:
friendly_name: 'Gft'
value_template: >
{{ as_timestamp(strptime(states('sensor.trash_gft'), '%d-%m-%Y')) | timestamp_custom('%a %d %b') }}
papier_formatted:
friendly_name: 'Papier'
value_template: >
{{ as_timestamp(strptime(states('sensor.trash_papier'), '%d-%m-%Y')) | timestamp_custom('%a %d %b') }}
plastic_verpakkingsafval_formatted:
friendly_name: 'Plastic'
value_template: >
{{ as_timestamp(strptime(states('sensor.trash_plastic'), '%d-%m-%Y')) | timestamp_custom('%a %d %b') }}
restafval_formatted:
friendly_name: 'Restafval'
value_template: >
{{ as_timestamp(strptime(states('sensor.trash_restafval'), '%d-%m-%Y')) | timestamp_custom('%a %d %b') }}
note that those formatted sensors are purely made for displaying nicely in the Lovelace card.
sensor.vandaag.state isnt a sensor, its the silly way of templating for the useful-markdown card, which is no longer needed.
You can now simply use jinja templates in the native Hassio markdown card
- type: markdown
content: >
Vandaag is het **<font color=green> {{states('sensor.vandaag')}}</font>**.
Volgende afval-ophaal over **<font color=var(--secondary-text-color)>{{states('sensor.trash_next')}}</font>** dagen:
**<font color=var(--secondary-text-color)>{{states('sensor.trash_firstdate')}}</font>** : **{{states('sensor.trash_firstwastetype')}}**
images:
asbest.png
elec.png
gft.png
gft3.png
glas.png
goedbeter.png
kca.png
kliko_geen.png
kliko.png
kringloop.png
milieustraat.png
papier.png
papier3.png
plastic.png
plastic3.png
restafval.png
restafval3.png
textiel.png
You might want to use the full package. Note that this also holds info for legacy HA (eg the groups), and useful customization, using custom-u which is needed separately:
##########################################################################################
## MijnAfvalWijzer Custom Component
## created by @xirixiz, more info on https://github.com/xirixiz/home-assistant-config
## https://community.home-assistant.io/t/garbage-pickup-date-mijnafvalwijzer-nl-custom-component/34631
# place this package in /config/packages
# place the custom component mijnafvalwijzer.py in /config/custom_components/sensor
# @marijnthvdb
##########################################################################################
# manual edit in CC:
# 226 trashFirstDate['value'] = scraper_data.find('p', attrs={'class':'firstDate'}).text.capitalize()
# 232 firstWasteType['value'] = scraper_data.find('p', attrs={'class':'firstWasteType'}).text.replace('.','')
homeassistant:
customize:
group.trash_calendar:
templates:
icon: >
if (entities['sensor.trash_today'].state === 'Geen') return 'mdi:delete-empty';
return 'mdi:delete-restore';
sensor.restafval:
entity_picture: /local/mijnafvalwijzer/restafval.png
sensor.plastic_verpakkingsafval:
entity_picture: /local/mijnafvalwijzer/plastic.png
sensor.gft:
entity_picture: /local/mijnafvalwijzer/gft.png
sensor.papier:
entity_picture: /local/mijnafvalwijzer/papier.png
sensor.restafval_formatted:
entity_picture: /local/mijnafvalwijzer/restafval.png
sensor.plastic_verpakkingsafval_formatted:
entity_picture: /local/mijnafvalwijzer/plastic.png
sensor.gft_formatted:
entity_picture: /local/mijnafvalwijzer/gft.png
sensor.papier_formatted:
entity_picture: /local/mijnafvalwijzer/papier.png
sensor.trash_gft:
hidden: true
sensor.trash_papier:
hidden: true
sensor.trash_plastic:
hidden: true
sensor.trash_restafval:
hidden: true
sensor.afval_vandaag:
templates:
theme: >
if (state === 'Papier') return 'papier';
if (state === 'Gft' ) return 'green';
if (state === 'Plastic') return 'orange';
if (state === 'Restafval') return 'black';
return 'grey';
sensor.afval_overmorgen:
templates:
theme: >
if (state === 'Papier') return 'papier';
if (state === 'Gft' ) return 'green';
if (state === 'Plastic') return 'orange';
if (state === 'Restafval') return 'black';
return 'grey';
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';
# sensor.trash_today:
# friendly_name: 'Afval vandaag'
# templates:
# entity_picture: >
# if (state === 'papier') return '/local/mijnafvalwijzer/papier.png';
# if (state === 'gft') return '/local/mijnafvalwijzer/gft.png';
# if (state === 'plastic') return '/local/mijnafvalwijzer/plastic.png';
# if (state === 'restafval') return '/local/mijnafvalwijzer/restafval.png';
# return '/local/mijnafvalwijzer/kliko_geen.png';
# theme: >
# if (state === 'papier') return 'papier';
# if (state === 'gft') return 'green';
# if (state === 'plastic') return 'orange';
# if (state === 'restafval') return 'black';
# return 'grey';
sensor.trash_tomorrow:
friendly_name: 'Afval morgen'
templates:
entity_picture: >
if (state === 'papier') return '/local/mijnafvalwijzer/papier.png';
if (state === 'gft') return '/local/mijnafvalwijzer/gft.png';
if (state === 'plastic verpakkingsafval') return '/local/mijnafvalwijzer/plastic.png';
if (state === 'restafval') return '/local/mijnafvalwijzer/restafval.png';
return '/local/mijnafvalwijzer/kliko_geen.png';
theme: >
if (state === 'papier') return 'papier';
if (state === 'gft') return 'green';
if (state === 'plastic verpakkingsafval') return 'orange';
if (state === 'restafval') return 'black';
return 'grey';
sensor.trash_firstdate:
friendly_name: First date
icon: mdi:calendar-check
templates:
theme: >
if (entities['sensor.trash_firstwastetype'].state === 'Papier en karton') return 'papier';
if (entities['sensor.trash_firstwastetype'].state === 'Groente, Fruit en Tuinafval' ) return 'green';
if (entities['sensor.trash_firstwastetype'].state === 'Plastic verpakkingsafval') return 'orange';
if (entities['sensor.trash_firstwastetype'].state === 'Restafval') return 'black';
return 'grey';
# sensor.afval_soort:
sensor.trash_firstwastetype:
friendly_name: First waste type
templates:
entity_picture: >
if (state === 'Papier en karton') return '/local/mijnafvalwijzer/papier.png';
if (state === 'Groente, Fruit en Tuinafval') return '/local/mijnafvalwijzer/gft.png';
if (state === 'Plastic verpakkingsafval') return '/local/mijnafvalwijzer/plastic.png';
if (state === 'Restafval') return '/local/mijnafvalwijzer/restafval.png';
return '/local/mijnafvalwijzer/kliko_geen.png';
theme: >
if (state === 'Papier en karton') return 'papier';
if (state === 'Groente, Fruit en Tuinafval') return 'green';
if (state === 'Plastic verpakkingsafval') return 'orange';
if (state === 'Restafval') return 'black';
return 'grey';
##########################################################################################
# Sensors
##########################################################################################
sensor:
- platform: mijnafvalwijzer
postcode: !secret postcode
huisnummer: !secret huisnummer
label_geen: 'Geen'
# scan_interval: 3600 #1 keer per uur
- platform: template
sensors:
restafval:
friendly_name: 'Restafval'
value_template: >
{{ as_timestamp(strptime(states('sensor.trash_restafval'), '%d-%m-%Y')) | timestamp_custom('%d %B') }}
plastic_verpakkingsafval:
friendly_name: 'Plastic'
value_template: >
{{ as_timestamp(strptime(states('sensor.trash_plastic'), '%d-%m-%Y')) | timestamp_custom('%d %B') }}
gft:
friendly_name: 'Gft'
value_template: >
{{ as_timestamp(strptime(states('sensor.trash_gft'), '%d-%m-%Y')) | timestamp_custom('%d %B') }}
papier:
friendly_name: 'Papier'
value_template: >
{{ as_timestamp(strptime(states('sensor.trash_papier'), '%d-%m-%Y')) | timestamp_custom('%d %B') }}
gft_formatted:
friendly_name: 'Gft'
value_template: >
{{ as_timestamp(strptime(states('sensor.trash_gft'), '%d-%m-%Y')) | timestamp_custom('%a %d %b') }}
papier_formatted:
friendly_name: 'Papier'
value_template: >
{{ as_timestamp(strptime(states('sensor.trash_papier'), '%d-%m-%Y')) | timestamp_custom('%a %d %b') }}
plastic_verpakkingsafval_formatted:
friendly_name: 'Plastic'
value_template: >
{{ as_timestamp(strptime(states('sensor.trash_plastic'), '%d-%m-%Y')) | timestamp_custom('%a %d %b') }}
restafval_formatted:
friendly_name: 'Restafval'
value_template: >
{{ as_timestamp(strptime(states('sensor.trash_restafval'), '%d-%m-%Y')) | timestamp_custom('%a %d %b') }}
afval_vandaag:
friendly_name_template: >
Vandaag: {{states('sensor.afval_vandaag')}}
value_template: >
{{states('sensor.trash_today')|title}}
entity_picture_template: >
{% set mapper = {'papier': '/local/mijnafvalwijzer/papier.png',
'gft': '/local/mijnafvalwijzer/gft.png',
'plastic': '/local/mijnafvalwijzer/plastic.png',
'restafval': '/local/mijnafvalwijzer/restafval.png'} %}
{% set state = states('sensor.afval_vandaag')|lower %}
{{ mapper[state] if state in mapper else '/local/mijnafvalwijzer/kliko_geen.png' }}
unit_of_measurement: Afval
# werkt niet zolang trash_next op de dag zelf niet de volgende trash soort toont
# afval_overmorgen_2:
# friendly_name: Afval overmorgen
# value_template: >
# {% if states('sensor.trash_next') == '2' %}
# {{states('sensor.trash_firstwastetype')}}
# {% else %} Geen
# {% endif %}
# entity_picture_template: >
# {% set mapper = {'Papier': '/local/mijnafvalwijzer/papier.png',
# 'Groente, Fruit en Tuinafval': '/local/mijnafvalwijzer/gft.png',
# 'Plastic verpakkingsafval': '/local/mijnafvalwijzer/plastic.png',
# 'Restafval': '/local/mijnafvalwijzer/restafval.png'} %}
# {% set state = states('sensor.afval_overmorgen') %}
# {{ mapper[state] if state in mapper else '/local/mijnafvalwijzer/kliko_geen.png' }}
# afval_overmorgen:
# friendly_name: Afval overmorgen
# value_template: >
# {% set afval = states('sensor.trash_firstwastetype') %}
# {% set overmorgen = states('sensor.trash_next') == '2' %}
# {% if overmorgen %} {{afval[:-1]}}
# {% else %} Geen
# {% endif %}
# entity_picture_template: >
# {% set mapper = {'Papier': '/local/mijnafvalwijzer/papier.png',
# 'Gft': '/local/mijnafvalwijzer/gft.png',
# 'Plastic': '/local/mijnafvalwijzer/plastic.png',
# 'Restafval': '/local/mijnafvalwijzer/restafval.png'} %}
# {% set state = states('sensor.afval_overmorgen') %}
# {{ mapper[state] if state in mapper else '/local/mijnafvalwijzer/kliko_geen.png' }}
afval_overmorgen:
friendly_name: Afval overmorgen
value_template: >
{% set date = (as_timestamp(now())+2*86400)|timestamp_custom('%d-%m-%Y') %}
{% if date == states('sensor.trash_papier') %} Papier
{% elif date == states('sensor.trash_gft') %} Gft
{% elif date == states('sensor.trash_plastic') %} Plastic
{% elif date == states('sensor.trash_restafval') %} Restafval
{% else %} Geen
{% endif %}
# {% set papier = (as_timestamp(strptime(states('sensor.trash_papier'), '%d-%m-%Y')) -
# (2 * 86400 )) | timestamp_custom('%d-%m-%Y') %}
# {% set gft = (as_timestamp(strptime(states('sensor.trash_gft'), '%d-%m-%Y')) -
# (2 * 86400 )) | timestamp_custom('%d-%m-%Y') %}
# {% set plastic = (as_timestamp(strptime(states('sensor.trash_plastic'), '%d-%m-%Y')) -
# (2 * 86400 )) | timestamp_custom('%d-%m-%Y') %}
# {% set rest = (as_timestamp(strptime(states('sensor.trash_restafval'), '%d-%m-%Y')) -
# (2 * 86400 )) | timestamp_custom('%d-%m-%Y') %}
# {% set date = now().strftime('%d-%m-%Y') %}
# {% if date == papier %} Papier
# {% elif date == gft %} Gft
# {% elif date == plastic %} Plastic
# {% elif date == rest %} Restafval
# {% else %} Geen
# {% endif %}
entity_picture_template: >
{% set mapper = {'Papier': '/local/mijnafvalwijzer/papier.png',
'Gft': '/local/mijnafvalwijzer/gft.png',
'Plastic': '/local/mijnafvalwijzer/plastic.png',
'Restafval': '/local/mijnafvalwijzer/restafval.png'} %}
{% set state = states('sensor.afval_overmorgen') %}
{{ mapper[state] if state in mapper else '/local/mijnafvalwijzer/kliko_geen.png' }}
# now in CC, so no need for manual sensor anymore:
# - platform: scrape
# resource: !secret scrape_resource_date
# name: Afval Datum
# select: '.firstDate'
# scan_interval: 3600
# - platform: scrape
# resource: !secret scrape_resource_type
# name: Afval Soort
# select: '.firstWasteType'
# scan_interval: 3600
##############################################################################################################
# Groups
##############################################################################################################
group:
trash_pickup:
name: 'Afvalwijzer ophaaldata'
icon: mdi:delete-restore
control: hidden
entities:
- sensor.trash_firstdate
- sensor.trash_firstwastetype
- sensor.trash_next
# - sensor.trash_today
- sensor.afval_vandaag
- sensor.trash_tomorrow
- sensor.afval_overmorgen
- sensor.restafval
- sensor.gft
- sensor.plastic_verpakkingsafval
- sensor.papier
- automation.afval_vandaag
- automation.afval_morgen
# - input_boolean.trash_moved
# - input_boolean.trash_reminder
afval_data_formatted:
name: Afval data
icon: mdi:calendar
entities:
- sensor.plastic_verpakkingsafval_formatted
- sensor.papier_formatted
- sensor.restafval_formatted
- sensor.gft_formatted
##############################################################################################################
# Automations
##############################################################################################################
automation:
##############################################################################################################
# Vandaag moet het afval worden voorgezet
##############################################################################################################
#datetime.date.today().strftime('%Y-%m-%d')
- alias: 'Afval vandaag'
id: 'Afval vandaag'
# initial_state: 'on'
trigger:
platform: time
at: '07:00:00'
condition:
condition: template
value_template: >
{{states('sensor.trash_today') != 'Geen'}}
action:
- service: script.intercom_message
data_template:
message_nl: >
Het is {{now().strftime('%A %-d %B')}}: vandaag wordt {{states('sensor.trash_today')}} opgehaald!
message_en: >
It is {{now().strftime('%A %-d %B')}}: today {{states('sensor.trash_today')}} will be collected!
- condition: template
value_template: >
{{ is_state('input_boolean.notify_utility', 'on')}}
- service: notify.notify
data_template:
message: >
{{ now().strftime('%d %B') }}: Afvalmelding vandaag wordt
{{states('sensor.trash_today')|title}} opgehaald!
- condition: template
value_template: >
{{ is_state('input_boolean.persistent_notification_create', 'on')}}
- service: persistent_notification.create
data_template:
notification_id: >
{{states('sensor.trash_today')}}-trash-notification
title: >
{{ now().strftime('%d %B') }}: Afvalmelding vandaag
message: >
{{states('sensor.trash_today')|title}} wordt opgehaald!
#werkt ook maar niet nodig als trash_today werkt
# - alias: 'Afval vandaag 2'
# initial_state: 'on'
# trigger:
# platform: time
# hours: 7
# minutes: 0
# seconds: 0
# condition:
# - condition: template
# value_template: >
# {{ states('sensor.trash_firstdate') == 'Vandaag' }}
# - condition: template
# value_template: >
# {{ is_state('input_boolean.notify_utility', 'on')}}
# action:
# - service: notify.notify
# data_template:
# title: >
# {{ now().strftime('%d %B') }}: Afvalmelding vandaag
# message: >
# Zet het {{states('sensor.trash_firstwastetype')|capitalize}} aan de straat!
# - condition: template
# value_template: >
# {{ is_state('input_boolean.persistent_notification_create', 'on')}}
# - service: persistent_notification.create
# data_template:
# title: >
# {{ now().strftime('%d %B') }}: Afvalmelding vandaag
# message: >
# Zet het {{states('sensor.trash_firstwastetype')|capitalize}} aan de straat!
##############################################################################################################
# Morgen moet het afval worden voorgezet
##############################################################################################################
- alias: 'Afval morgen'
id: 'Afval morgen'
# initial_state: 'on'
trigger:
platform: time
at: '20:00:00'
condition:
- condition: template
value_template: >
{{states('sensor.trash_tomorrow') != 'Geen'}}
action:
- service: script.intercom_message
data_template:
message: >
Het is {{ now().strftime('%d %B') }}: Morgen wordt
{{states('sensor.trash_tomorrow')|title}} opgehaald!
- condition: template
value_template: >
{{ is_state('input_boolean.notify_utility', 'on')}}
- service: notify.notify
data_template:
title: >
{{ now().strftime('%d %B') }}: Afvalmelding morgen
message: >
{{states('sensor.trash_tomorrow')|title}} wordt morgen opgehaald!
- condition: template
value_template: >
{{ is_state('input_boolean.persistent_notification_create', 'on')}}
- service: persistent_notification.create
data_template:
notification_id: >
{{states('sensor.trash_tomorrow')}}-trash-notification
title: >
{{ now().strftime('%d %B') }}: Afvalmelding morgen
message: >
{{states('sensor.trash_tomorrow')|title}} wordt morgen opgehaald!
#
#
#
# - alias: Reset trash notification
# trigger:
# platform: state
# entity_id: input_boolean.trash_moved
# to: 'on'
# for:
# hours: 12
# action:
# - service: input_boolean.turn_off
# entity_id: input_boolean.trash_moved
# - service: input_boolean.turn_on
# entity_id: input_boolean.trash_reminder
#
# - alias: Mark trash as moved from notification
# trigger:
# platform: event
# event_type: ios.notification_action_fired
## event_data:
## actionName: MARK_TRASH_MOVED
# condition:
# condition: template
# value_template: >
# {{(trigger.event.data.actionName == 'MARK_TRASH_MOVED')}}
# action:
# service: input_boolean.turn_on
# entity_id: input_boolean.trash_moved
#
# - alias: Trash has not been moved
# trigger:
# platform: time_pattern
# minutes: '/30'
# seconds: 00
# condition:
# condition: and
# conditions:
# - condition: template
# value_template: >
# {{is_state('input_boolean.trash_moved','off')}}
# - condition: template
# value_template: >
# {{is_state('input_boolean.trash_reminder','on')}}
# - condition: time
# after: '18:00:00'
# before: '23:00:00'
# - condition: template
# value_template: >
# {{ states('sensor.trash_tomorrow') != 'Geen' }}
# action:
# service: notify.ios_telefoonmhb
# data_template:
# title: 'Afval'
# message: >
# {{ states('sensor.trash_tomorrow') }} wordt morgen opgehaald, zet het afval aan de straat
# data:
# push:
# badge: 0
# sound: https://hvb.duckdns.org:8124/local/sounds/sound_bites/siren.mp3
# category: 'afval'
## action_data:
## entity_id: input_boolean.trash_moved
###############################################################################################################
## Ios
###############################################################################################################
#
#ios:
# push:
# categories:
# - name: Afval
# identifier: 'afval'
# actions:
# - identifier: 'MARK_TRASH_MOVED'
# title: 'Afval verwerkt'
# activationMode: 'background'
# authenticationRequired: yes
# destructive: yes
# behavior: 'default'
#
###############################################################################################################
## Inputs
###############################################################################################################
#
#input_boolean:
# trash_moved:
# name: Trash has been moved
# initial: 'off'
# icon: mdi:delete-empty
# trash_reminder:
# name: Trash reminder enabled
# initial: 'on'
# icon: mdi:cellphone-message
# - alias: 'Afval morgen'
# id: 'Afval morgen'
# initial_state: 'on'
# trigger:
# platform: time
# hours: 20
# minutes: 0
# seconds: 0
# condition:
# - condition: template
# value_template: >
# {{ is_state('input_boolean.notify_utility', 'on')}}
# - condition: template
# value_template: >
# {{states('sensor.trash_tomorrow') != 'Geen'}}
# action:
# - service: notify.notify
# data_template:
# message: >
# Het is vandaag {{ now().strftime('%d %B') }},
# {{states('sensor.afval_soort')|replace('.','')}} wordt morgen opgehaald!
# - condition: template
# value_template: >
# {{ is_state('input_boolean.persistent_notification_create', 'on')}}
# - service: persistent_notification.create
# data_template:
# message : >
# Het is vandaag {{ now().strftime('%d %B') }},
# {{states('sensor.afval_soort')|replace('.','')}} wordt morgen opgehaald!,
# Trash tomorrow: {{states('sensor.trash_tomorrow')}}'
# title: >
# Afvalmelding Morgen: {{states('sensor.afval_soort')|replace('.','')}} : {{states('sensor.trash_tomorrow')}}
# - alias: 'Trash tomorrow'
# id: 'Trash tomorrow'
# initial_state: 'on'
# trigger:
# platform: time
# hours: 20
# minutes: 0
# seconds: 0
# condition:
# - condition: template
# value_template: >
# {{ is_state('input_boolean.notify_utility', 'on')}}
# - condition: or
# conditions:
# - condition: template
# value_template: >
# {{ (now().strftime('%d-%m-%Y')) ==
# (as_timestamp(strptime(states('sensor.trash_gft'), '%d-%m-%Y')) -
# (1 * 86400 )) | timestamp_custom('%d-%m-%Y') }}
# - condition: template
# value_template: >
# {{ (now().strftime('%d-%m-%Y')) ==
# (as_timestamp(strptime(states('sensor.trash_restafval'), '%d-%m-%Y')) -
# (1 * 86400 )) | timestamp_custom('%d-%m-%Y') }}
# - condition: template
# value_template: >
# {{ (now().strftime('%d-%m-%Y')) ==
# (as_timestamp(strptime(states('sensor.trash_papier'), '%d-%m-%Y')) -
# (1 * 86400 )) | timestamp_custom('%d-%m-%Y') }}
# - condition: template
# value_template: >
# {{ (now().strftime('%d-%m-%Y')) ==
# (as_timestamp(strptime(states('sensor.trash_plastic'), '%d-%m-%Y')) -
# (1 * 86400 )) | timestamp_custom('%d-%m-%Y') }}
# action:
# service: notify.notify
# data_template:
# title: >
# {{ now().strftime('%d %B') }}: Morgen afval voor zetten!
# message: >-
# {% if (now().strftime('%d-%m-%Y')) ==
# (as_timestamp(strptime(states('sensor.trash_gft'), '%d-%m-%Y')) -
# (1 * 86400 )) | timestamp_custom('%d-%m-%Y') %}
# De groene bak wordt geleegd op: {{ states('sensor.trash_gft')}}!
# {% endif %}
# {% if (now().strftime('%d-%m-%Y')) ==
# (as_timestamp(strptime(states('sensor.trash_restafval'), '%d-%m-%Y')) -
# (1 * 86400 )) | timestamp_custom('%d-%m-%Y') %}
# De grijze bak wordt geleegd op: {{ states('sensor.restafval')}}!
# {% endif %}
# {% if (now().strftime('%d-%m-%Y')) ==
# (as_timestamp(strptime(states('sensor.trash_papier'), '%d-%m-%Y')) -
# (1 * 86400 )) | timestamp_custom('%d-%m-%Y') %}
# Papier wordt opgehaald op: {{ states('sensor.trash_papier')}}!
# {% endif %}
# {% if (now().strftime('%d-%m-%Y')) ==
# (as_timestamp(strptime(states('sensor.trash_plastic'), '%d-%m-%Y')) -
# (1 * 86400 )) | timestamp_custom('%d-%m-%Y') %}
# Plastic wordt opgehaald op: {{ states('sensor.trash_plastic')}}!
# {% endif %}