Help your Assist Voice Satellite handle background noise

My Home Assistant Voice Preview Edition is a bit too good at hearing speech once activated. If I’ve got the news on, it’s just about impossible to issue a voice command as the satellite continues to hear the news anchors speaking after I’ve stopped. I put together a quick fix that’s been working well. Apologies if someone’s already shared similar.

Your satellite’s status will become “listening” after hearing your activation word. So create an automation with that as your trigger. I add a condition to see if my TV is on. I have the Harmony integration, so I check to see if the remote’s state is “Watch TV” since this doesn’t seem as necessary if I’m listening to music.

My action has 3 steps. Send a mute command. How you do this’ll depend on your setup, but I’m using a remote.send_command. Then I have a wait template that watches for the satellite to stop listening. Here’s the template, your entity will depend on your satellite’s entity.

{{ states('assist_satellite.home_assistant_voice_kitchen_assist_satellite') !=
  "listening" }}

I have it set to continue on timeout after 30 seconds just in case. Then I send the “mute” command again to resume sound on the TV.

This has been super helpful. Hope it helps someone else.

Here’s the YAML for the whole automation if that’s helpful.

alias: Mute TV while Jarvis is listening
description: ""
triggers:
  - trigger: state
    entity_id:
      - assist_satellite.home_assistant_voice_kitchen_assist_satellite
    to: listening
conditions:
  - condition: state
    entity_id: sensor.livingroom_remote
    state: Watch TV
actions:
  - action: remote.send_command
    target:
      entity_id: remote.livingroom
    data:
      num_repeats: 1
      delay_secs: 0.4
      hold_secs: 0
      device: "66390236"
      command: Mute
  - wait_template: >-
      {{ states('assist_satellite.home_assistant_voice_kitchen_assist_satellite') != "listening" }}
    continue_on_timeout: true
    timeout: "30"
  - action: remote.send_command
    target:
      entity_id: remote.livingroom
    data:
      num_repeats: 1
      delay_secs: 0.4
      hold_secs: 0
      device: "66390236"
      command: Mute
mode: single

I actually pause when listening
I use “from: listening” to unpause instead of wait_template

1 Like

There are 4 states for voice device

listening
processing
responding
idle

i recently learned that “nevermind” or “never mind” cancels listening. Processing and Responding never happen.

“from: listening” works and may actually be best
currently I am testing using “to: idle”. I want to check if there is a difference “to: idle” vs “from: listening”

i think from: listening may be best because that is only time lowering volume matters

Right. From:listening as a trigger essentially does the same thing as my wait template, but all in one action rather than separate automation triggers. I think it works better since I can specify a timeout, too.

Hello,
How did you set the timeout?

Would You mind sharing entire automation using from:listening ?

Are you asking me or @tmjpugh ? My full automation is above. There’s no timeout, per se. The wait template waits for the satellite to finish listening. All of the logic for everything is in a single automation/action.

Oh, yes sorry. Thanks for quick clarification. I have probably misunderstood Your previous comment a bit.

So basically if anything happens and after 30 sec state is still listening, it will unmute anyway thanks to “continue on timeout” right?

Right. The timeout is just to be there if something goes wrong so that the TV won’t stay muted indefinitely.

2 Likes