I set up an automation to get a notification on my phone the day before the trash will be emptied.
It works mostly as intended, but:
“Tomorrow the “08.04.2025” will be emptied!” is pointless.
For the notification I use:
action: notify.mobile_app_myphone
data_template:
title: Trash
message: >-
Tomorrow the {{
(states.sensor.trash.attributes.values()|list)[0] }} will be emptied!
The entity “sensor.trash” has the following state:
Paper: "2025-04-08"
Plastic: "2025-04-11"
Organic: "2025-04-16"
attribution: "Last update: 04/07/25 13:20:39"
icon: fas:trash
friendly_name: Trash
Apparently I need to fix states.sensor.trash.attributes.values()|list)[0], but I didn’t manage to find out how!
Can someone point me in the right direction?