> {# Birthdays #} {% from 'formatting.jinja' import cleanup %} {%- macro getReport() -%}
{{ [ 'Attention household, I am told that there is a birthday among us!', 'Ladies and gentlemen, boys and girls, gather round as we celebrate a birthday!', 'Oh hey, look at this, my records show that there is a birthday today!', 'Well what do you know, my sensors are detecting a birthday!' ] | random }}
{% if is_state('sensor.anniversary_tony_s_birthday','0') %} Happy {{ states('sensor.tony_current_age') }}th birthday Tony! {% elif is_state('sensor.anniversary_tina_s_birthday','0') %} Happy {{ states('sensor.tina_current_age') }}th birthday Tina! {% elif is_state('sensor.anniversary_kallen_s_birthday','0') %} Happy {{ states('sensor.kallen_current_age') }}th birthday Collin! {% elif is_state('sensor.anniversary_emmalynn_s_birthday','0') %} Happy {{ states('sensor.emma_current_age') }}th birthday Emmalynn! {% endif %}
From Jarvis, the Stork Family, and everyone at Nerd Home Incorporated, we hope you have a great year!
{%- endmacro -%} {{- cleanup(getReport()) -}}