triggers:
- at: "08:00:00"
trigger: time
conditions: []
actions:
- target:
entity_id: calendar.family
data:
start_date_time: "{{ today_at('00:00') }}"
end_date_time: "{{ today_at('00:00') + timedelta(days=7) }}"
response_variable: calendar_events_var
action: calendar.get_events
- action: notify.orion
metadata: {}
data:
message: >
{% set calendar_events =
calendar_events_var['calendar.family']['events'] %}
{% if calendar_events | count > 0 %}
You have the following events happening next week:
{% for event in calendar_events %}
- {{ event.summary }} on {{ (event.start | as_datetime ).strftime('%A, %B %d at %H:%M') }}
{% endfor %}
{% elif calendar_events | count == 0 %}
There's no events on your calendar next week!
{% endif %}
- action: tts.google_cloud
metadata: {}
data:
cache: false
entity_id: media_player.andrew_study_speaker
message: "{{ announcement }}"
I keep getting this error