Please, give me an advice.
I use google nest and google home speaker to report events in HA.
See:
alias: Warning at 7 p.m
description: ""
trigger:
- platform: time
at: "19:00:00"
condition: []
action:
- service: media_player.play_media
target:
entity_id: media_player.indoor
data:
media_content_id: >-
media-source://tts/google_translate?message=it+will+be+7+clock
media_content_type: provider
metadata:
title: It will be 7 clock
thumbnail: https://brands.home-assistant.io/_/google_translate/logo.png
media_class: app
children_media_class: null
navigateIds:
- {}
- media_content_type: app
media_content_id: media-source://tts
- media_content_type: provider
media_content_id: >-
media-source://tts/google_translate?message=it+will+be+7+clock
mode: single
Simple automation. Google speaker tells me to the indoor group that it will be 7 o’clock.
The problem is, however, that when I play Spotify music on the indoor group, it interrupts my music, but it does not return my music back. How can I incorporate it into the automation so that it starts playing Spotify again after the event?
Thank you
Thanks, it seems to work. I’m just afraid that something will go wrong in there over time, since I had to install 3 things. It’s a shame that it’s so complicated and it’s not already somehow incorporated in a clean HA installation.
You could try using the new google SDK integration as that allows TTS messages to be sent to google speakers / media players as a broadcast and therefore does not interfere with what ever is currently playing.
It will preface the message with “incoming broadcast” however.
However in my experience it was super unreliable and reverted back to playing local files as notifications that do of course disrupt what if anything is already playing.
Unfortunately, it doesn’t work as it should. I tried it yesterday by turning on the radio or Spotify and then going classically in HA to the media item and there I started TTS spoken text. That worked beautifully. The music stopped and then it played again. In the automations, it was seen that the automation 00 - Google Home Automatic Resume - was turned on and used.
However, if the sound from TTS comes from some automation, see the automation that I have inserted here, it does not work and the automation 00 - Google Home Automatic Resume will not start either. I have no idea why?
The link I posted above leads to a topic with over 800 posts containing questions and answers concerning the script. It’s also where you can ask the script’s author any new questions.