Can i TTS Google calendar message?

Hello i installe tts and Google Calendar Event. Its possible to play on google home the message that show on google calendar component? My goal its to play every morning our 1st metting and starting time :slight_smile:

calendar.xxxxxxxxx.com off all_day: false
description:

end_time: 2016-12-29 10:30:00
friendly_name: xxxxxxxxxx
location: xxxxxxxxxxx
message: xxxxxxxxxx
offset_reached: false
start_time: xxxxxxx

thanks

You should be able to. Play with

{{  states.calendar.work.attributes.start_time }}
{{  states.calendar.work.attributes.message }}

Something like this:
(not tested)

tts_test:
   alias: tts testing
   sequence:
     - alias: testing the tts
       service: tts.google_say
       data:
         message: 'Your next meeting called  {{  states.calendar.work.attributes.message }} and it will be at {{  states.calendar.work.attributes.start_time }}'

Hello i try like this but did not work. google read what its inside the {{}} instead of interpret

ale_good_morning:
   alias: Alejandra Good Morning
   sequence:
     - alias: the ales tts
       service: tts.google_say
       entity_id: media_player.master_bedroom_home
       data:
         message: 'Good morning, Alejandra. Your next meeting called {{  states.calendar.alejandrajvrproductionscom.attributes.message }} and it will be at {{  states.calendar.alejandrajvrproductionscom.attributes.start_time }}'

you need to use data_template: instead of data:

sequence:
- service: tts.google_say
data_template:
entity_id: media_player.master_bedroom_home
message: ‘Good morning, Alejandra. Your next meeting called {{ states.calendar.alejandrajvrproductionscom.attributes.message }} and it will be at {{ states.calendar.alejandrajvrproductionscom.attributes.start_time }}’

but than with the right spacing :wink: to make it work

2 Likes

THanks :slight_smile: Work great…

I have the following script that read a calendar in the morning for me.

I would like to condition the option to read the canlendario. Only if you have an event.

How could I do it?

- id: '1529625339241'
  alias: Acordando
  trigger:
  - at: 00:07:00
    platform: time
  condition: []
  action:
  - data_template:
      message: 'Bom dia! Dormiu bem ?'
    entity_id: media_player.living_room_speaker
    service: tts.google_say
  - delay: 00:00:03
  - data_template:
      message: "A temperatura em Duque de Caxias é {{states('sensor.yweather_temperature')}}."
    entity_id: media_player.living_room_speaker
    service: tts.google_say
  - delay: 00:00:04
  - data_template:
      message: "Iniciei o preparo do seu café"
    entity_id: media_player.living_room_speaker
    service: tts.google_say
  - delay: 00:00:03
  - data_template:
      message: "Hoje é  {{  states.calendar.contacts.attributes.message }}"
    entity_id: media_player.living_room_speaker
    service: tts.google_say
  - condition: state
    entity_id: 'calendar.contacts'
    state: 'on'
  - data_template:
      message: "Hoje é  {{  states.calendar.contacts.attributes.message }}"
2 Likes