Garage door open TTS announcer/reminder

This is an improvement on this blueprint:
https://community.home-assistant.io/t/door-open-tts-announcer/266252

I’ve adjusted it slightly so that it immediately notifies when the garage door is open, waits the defined period of time, and announces immediately when the garage door is closed.

blueprint:
  name: Garage Door open TTS announcer
  domain: automation
  input:
    monitored_entity:
      name: Monitored Sensor
      description: Entity that causes announcement
      selector:
        entity:
          domain: cover
          device_class: garage
    speaker_target:
      name: Speaker
      description: Entity to announce event on
      selector:
        target:
          entity:
            domain: media_player
    announcement_message:
      name: Announcement message
      description: What to say when door is opened
    final_message:
      name: Final message
      description: What to say when door is closed
    cooldown:
      name: Announcement cooldown
      description: The minimum time needed in between announcements
      default: 10
      selector:
        number:
          min: 0.0
          max: 600.0
          unit_of_measurement: seconds
          mode: slider
          step: 1.0
  source_url: https://community.home-assistant.io/t/door-open-tts-announcer/266252
mode: single
trigger:
  platform: state
  entity_id: !input 'monitored_entity'
  from: 'closed'
  to: 'open'
action:
- alias: Repeat the sequence UNTIL the door is closed
  repeat:
    sequence:
    - service: tts.google_translate_say
      target: !input 'speaker_target'
      data:
        message: !input 'announcement_message'
    - wait_for_trigger:
      - platform: state
        entity_id: !input 'monitored_entity'
        to: 'closed'
        for: 10
      timeout:  !input 'cooldown'
    until:
    - condition: state
      entity_id: !input 'monitored_entity'
      state: 'closed'
- service: tts.google_translate_say
  target: !input 'speaker_target'
  data:
    message: !input 'final_message'
2 Likes

I tried your blue print however it is just keeps announcing to closed the door even know it is already closed.

Are you sure that it doesn’t flip back and forth?

I closed the door 5 minutes ago and have it reporting every 14 seconds and it keeps going off even know the door has been closed. I am using a contact sensor on my door that goes into my garage.

Well yes, but what shows in the entities section of devtools? Does it seem to randomly be changing between states?

No it doesn’t appeared to be changing

closing of the door does not stop the automation, it just turns on and never turns off. it is like it is missing the trigger that the door was closed.

Does it go from closed to open, and open to closed, correctly?

I assume the device shows as a ‘cover’ with ‘open’ and ‘closed’ states… I know this one works for me and my 2 garage doors, but if you’re using it with another type of sensor (such as binary or door) then it’ll probably not react as expected.

that might be possible, maybe I will try it with another sensor

Hi doughecka, great Blueprint. I think you need to do an update for the ‘tts.google_say’ integration to the now used ‘tts.google_translate_say’. My automation is getting an error with the ‘tts.google_say’.

I was just trouble shooting this blueprint for my father in law and realized why he was having issues with it… I believe that at some point the service tts.google_say was changed to tts.google_translate_say.

If anyone else is having issues with this blueprint on newer versions of HA you most likely just need to copy the BP file into a new location and change the google_say to google_translate_say

Hope this helps someone until this gets updated.

I’ve adjusted the blueprint to use google_translate_say instead of google_say, however that did require that I change my configuration.yaml to use google_translate_say.

tts:
  - platform: google_translate
    service_name: google_translate_say

What version of HA are you using?

And side note, in my opinion, google_translate_say doesn’t sound as good as google_say… Not sure why the difference. Same voice, but it’s not as ‘smooth’.

Sorry, didn’t see your reply. I’m running the latest version as of a few days ago, 2021.12.0
What’s confusing is that the documentation references both ways:

The extended example near the beginning of the page shows google_say, but other examples show google_translate_say.

Maybe this is because I’ve got my google API account setup to support both methods? Or I’ve had it for so long that I have a feature/service that’s not available any longer?

Do you mind doing a new updated one as my garage door shows as cover and as a device. thanks