Not sure if this was obvious to a lot of people but it had me stumped for a while and I have just figured out a stable way to have more control over google home timers and tv.
I had two problems:
The first was relating to Google assistant timers, we have a Google home mini in the kitchen that mostly gets used for timers, this has been working well, but became quickly frustrating due to the fact that once the timer is ringing the home mini struggles to hear the 'hey Google’s or ‘stop’ command over its own alarm. This meant we ended up shouting at it repeatedly. Not good for the wife approval factor.
The second is that I wanted to create some automations for the Google Chromecast with TV to pause and play media when either the doorbell rang, a phone in the house was answered or we stood up from the sofa. In principal with the android tv integration this worked well, except for Netflix, which annoyingly does not respond to the pause or play commands.
The first thought on a solution was to find a way to silently send voice commands to the Google home mini from Home Assistant, the only reference to this I could find was creating a Google developer account and very quickly this seemed like a sledgehammer to crack a nut solution. Back to the drawing board.
So the solution, again this may have been obvious and others may already be doing this but I couldn’t find any online reference to this workaround so I thought I would post to try and assist others stuck in the same or similar struggle!
From what I can tell, you will need nabu casa for this:
For any silent voice command you want to carry out on Google, create an input boolean, then expose this to Google home. Then in the Google home app create a routine/automation which is triggered by the input boolean being in an ‘on’ state. Then set the action to ‘custom action’ and type in the voice command you want to trigger. Then select the audio device as your chosen Google home speaker (I couldn’t get it to work without selecting one). Then set an automation in Home Assistant that is triggered by the input boolean turning on and the action is to wait 1-3 seconds and then turn it off again (this is to ensure that it resets ready for next use).
So for the timer I have used the HACS Google assistant integration to detect when there is a timer set and send an actionable notification that has the option to either add five minutes or end the timer, I did find that with the 180 second update refresh on this integration I have started having it pop the notification up when the timer is ‘set’ as opposed to ‘ringing’ as with the delay it could be ringing for up to 3 minutes depending on the last refresh and the end of the timer.
For the TV I have set up an input boolean that tells Google to pause the TV, and the automation detects if it is Netflix or another app and if it is Netflix it uses the input boolean and if it is a different app it uses the android tv integration.
I hope this makes sense, and might help someone else!
Thanks for all the great posts!