Google Home TTS with ESP Home integration

I can get TTS to work via the Developer Tools so I tried to use it in my esphome yaml file which did not work.

What I was trying to achieve was an audio message from google home before the beeping started.

- platform: template
  name: "Siren"
  optimistic: yes
  id: sirentemp
  turn_on_action:
    service: tts.google_translate_say
    data:
      entity_id: media_player.photo_display
      message: "Please check your phone."
  - while:
      condition:
        lambda: 'return true;'
      then:
      - switch.turn_on: are_you_home_siren
      - delay: 500ms 
      - switch.turn_off: are_you_home_siren
      - delay: 500ms
  turn_off_action:
  - switch.turn_off: are_you_home_siren

Changed my approach and used the following tutorial: Using Home Assistant TTS to Announce Your Arrival | by Cyan Automation | Medium

Works like a dream :slight_smile:

Final project: https://www.instructables.com/Anyone-Home/ (see step 4 at end for HASS integration steps).

So…?
Why not just TTS a message instead of building that (annoying) thing?

Or if [phone] gets three calls within one minute command it to turn off do not disturb mode.

Because I love tinkering in the maker space and learning new skills. Also, the project slowly morphed. I wasn’t playing too much with Homes Assistant when I initially build the device. But yes, agreed it is all overkill :slight_smile: (although the truth be told it was built more as a joke).

1 Like