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