Hey, new to HA, so bear with me. I have the following script. and I want to pass the summary of the day’s calendar event to tts.speak. But for some reason I can’t figure out how to get tts.speak to play the event.summary on my speaker. Any help is much appreciated
The example you posted contains three summaries, one for each of the three days. Which one do you want to send to tts.speak? Or do you want all of them?
If all of them, do you want an introduction spoken before each summary (such as the date and time) or just speak all three in sequence?
Good day! There are 3 upcoming events. On Wednesday May 29, all-day event, Bob’s birthday. On Friday May 31, 6:30, Walk the dog. On Friday May 31, 12:00, Lunch with Lisa.
At a minimum, the example demonstrates how to iterate through the upcoming events and convert them into spoken English phrases. Obviously the template can be customized to produce the exact phrases you prefer in your native language.
What you will find is that iterating through the events is the easy part. The challenging part is converting the date, time, and message into a sentence that sounds natural when spoken. For example, it can get complicated if you want it to say “Today” and “Tomorrow” instead of saying the complete date (for events that occur today/tomorrow).
Be advised that strftime can only convert to English months and days.