How to trigger automation
ranrinc opened this issue · 2 comments
ranrinc commented
Hi there,
Is there away to trigger birthday wishes via google home on specific time (for example at 7'oclock in the morning) rather then after midnight?
and add RIP symbol next to the name of bday if he or she have been pass away?
rikardronnkvist commented
Something like this would probably work:
some_id:
trigger:
- platform: time
at: "07:00:00"
sequence:
- service: tts.google_translate_say
entity_id: media_player.some_player
data_template:
message: >
{% for state in states.birthdays -%}
{% if state.state == "0" -%}
Today it's {{ state.name }} {{ state_attr(state.entity_id, "age_at_next_birthday") }} birthday.
{%- endif %}
{%- endfor %}
(Cant get a code-block to work... but I think you can figure out how to use it :) )