i have google calendar where i can see data ok: calendar.working_juha
but i cannot make working script what says my next 7 days shifts from there to to my Sonos hallway speaker with edge say tts.
And always in google cal event there is begining JUHA: and i want tts not say it, only read event name.
I have tried many different variantios and last what i get it say not available was:
Google give today:
message: JUHA: ILTA Aikaisemmin 15:00-23
all_day: false
start_time: 2025-04-25 15:00:00
end_time: 2025-04-25 22:30:00
location:
description:
offset_reached: false
friendly_name: Working juha
supported_features: 3
alias: Juhan viikon työvuorot ääneen
sequence:
-
variables:
juha_vuorot: “{{ states.calendar.working_juha.attributes.events }}”
viikonpaivat:
Monday: maanantaina
Tuesday: tiistaina
Wednesday: keskiviikkona
Thursday: torstaina
Friday: perjantaina
Saturday: lauantaina
Sunday: sunnuntaina -
service: tts.edge_tts_say
target:
entity_id: media_player.sonossonos_hallway
data:
message: >
{% if juha_vuorot is not defined or juha_vuorot | length == 0 %}
Juhan työvuorot tälle viikolle eivät ole saatavilla.
{% else %}
Juhan työvuorot tälle viikolle ovat seuraavat:
{%- for event in teija_vuorot %}
{{ viikonpaivat[as_datetime(event.start).strftime(‘%A’)] }}: {{ event.summary.replace(‘JUHA:’, ‘’).strip() }}.
{%- endfor %}
{% endif %}
mode: single
description: “”