Having the TV turn the volume down when I say: "Hey, Google..."

The automation seems quite simple, trying to imitate the process, as the speaker does - whenever I say “Hey Google”, if it’s playing something, the volume goes down.

Now, the problem I can’t wrap my head around, is how to communicate with HA when the speaker starts listening. Its status doesn’t change from “Off”, even when it activates after the command: “Hey, Google…”

Any ideias?

You need a broadlink or an integration where you can control the TV

I have both. Broadlink and WebOs integration. So there’s no problem with the connection between the TV set and HA.
The problem is how to make the HA receive any kind of data saying that the Google Speaker (mini nest 2) is in listening mode, after I said “Hey, Google”.

You can add a boolean that you set to on with google home, then read the state change in the automation in HA.
Just don’t forget to set it to off at the end of the automation

But this requires a link between Google and HA (Nabu casa or the free way of doing it)

I think the initial ‘hey google’ and immediate response are handled entirely locally on the speaker, and as far as I know it doesn’t deliberately signal anything on the network when it’s doing that. It may start sending the processed request out to the assistant servers soon after it starts listening, I’m not sure; but you’d need to catch that request going from the speaker through the router somehow (mitm proxy?). I haven’t heard of anyone’s that has done that, but it’s possible they have.

A different line of attack would be to listen for the ‘hey google’ keyword with a different device’s (e.g. raspberry pi) speech recognition system and use that to signal the tv. Timing would be an issue.

I do have the link, but if I create a boolean it would be limited it to a specific command; like:
“Hey Google… Turn the light On.”

Not the initial reaction, of listening mode, by the speaker. There’s no change on its state in that initial moment. That’s the problem. :thinking:

Yeah, that’s what I’m afraid.

I did thought about the second option but… damn.

You say hey google… Set input_boolea.volume_down to on.
Then the boolean will be on, this can be used in an automation.

You can create a routine i. Google home that can convert the “Set input_boolea.volume_down to on” to “volume down”.

One other option is to use IFTTT.
It can capture and pass variables that can be sent to HA. But it has its limitations.