HI guys, I’ve struggled to find an answer across multiple posts and forums.
but I have persevered and combined multiple suggestions into a solution that works for me as a morning agenda for the day.
Step 1 - go to google calendar, click the 3 dots on the calendar you want, settings > scroll to bottom - copy ICAL Link
Step 2 - go to HAC > search for ICAL and download and install
Step 3 - Reboot HA
Step 4 - Go to Integrations > Add > ICAL
Step 5 - Paste your ICAL Link you copied earlier and set number of events to grab, I used 10 as I would never have more than 10 events to check, do note it checks multiple days, so if have only 5 tasks over a week, it will list them across the week for you
Step 6 - Wait for about 1-2 minutes for the sensors to populate
now you can built your template for your text to speech
here is my template I wrote … I only need 4 or so but you can adapt it for more if you like
the code has IF functions to determine if the event is today and alexa or google will say the event is at 8 today instead of the day of the week etc.
Its not perfect yet but its working!
Your next 4 events .. at {{ as_timestamp(state_attr('sensor.ical_carl_event_0' |string, "start")) | timestamp_custom('%H:%M') }} {% if (now().date() + timedelta(days=0)) | string ==
as_timestamp(state_attr('sensor.ical_carl_event_0' |string, "start")) |timestamp_custom('%Y-%m-%d') %}Today {% else %} {{ as_timestamp(state_attr('sensor.ical_carl_event_0' |string, "start")) | timestamp_custom('%A') }}
{% endif %}
.. {{ state_attr('sensor.ical_carl_event_0' |string, "summary") }} ..
and at {{ as_timestamp(state_attr('sensor.ical_carl_event_1' |string, "start")) | timestamp_custom('%H:%M') }}
{% if (now().date() + timedelta(days=0)) | string ==
as_timestamp(state_attr('sensor.ical_carl_event_1' |string, "start")) |timestamp_custom('%Y-%m-%d') %}Today {% else %} {{ as_timestamp(state_attr('sensor.ical_carl_event_1' |string, "start")) | timestamp_custom('%A') }}
{% endif %}
.. {{ state_attr('sensor.ical_carl_event_1' |string, "summary") }}
then at {{ as_timestamp(state_attr('sensor.ical_carl_event_2' |string, "start")) | timestamp_custom('%H:%M') }}
{% if (now().date() + timedelta(days=0)) | string ==
as_timestamp(state_attr('sensor.ical_carl_event_2' |string, "start")) |timestamp_custom('%Y-%m-%d') %}Today {% else %} {{ as_timestamp(state_attr('sensor.ical_carl_event_2' |string, "start")) | timestamp_custom('%A') }}
{% endif %} .. {{ state_attr('sensor.ical_carl_event_2' |string, "summary") }}
and finally at {{ as_timestamp(state_attr('sensor.ical_carl_event_3' |string, "start")) | timestamp_custom('%H:%M') }}
{% if (now().date() + timedelta(days=0)) | string ==
as_timestamp(state_attr('sensor.ical_carl_event_3' |string, "start")) |timestamp_custom('%Y-%m-%d') %}Today {% else %} {{ as_timestamp(state_attr('sensor.ical_carl_event_3' |string, "start")) | timestamp_custom('%A') }}
{% endif %} .. {{ state_attr('sensor.ical_carl_event_3' |string, "summary") }}
This code produces text like this
Your next 4 events at 08:30 Today blah blah
and at 09:30 Today blah blah
then at 19:30 Today blah blah
and finally at 09:00 Tuesday … blah blah
the . . in the code is a breather for alexa so they speaks normally instead of rattling it off like a robot
I hope this helps you guys!