I am using Mushroom Template Card to give me a nice look for for the Garbage Collection Integration, and would like the count for days to show as “Today” “Tomorrow” or “x Days”.
Collection day is today and currently, my sensor reads “0 days”
secondary: >
{% set days = state_attr('sensor.recycling_bins','days') %}
{% if days == 0 %}
Today
{% elif days == 1 %}
Tomorrow
{% else %}
{{ days }} days
{% endif %}
{% set days = state_attr('sensor.recycling_bins','days') %}
{% if days == 0 %}
Today
{% elif days == 1 %}
Tomorrow
{% else %}
{{ days }} days
{% endif %}
I was wondering if anyone had suggestions in doing the opposite. My sensor reports the state as x days already however, when it is today or tomorrow it actually reports today or tomorrow. Which doesn’t work for auto-entities filter by date.
What would be the best way to make a template that turns the today into 0 days and the tomorrow into 1 day?