#Volume ducking for HA assist responses

1 messages · Page 1 of 1 (latest)

flint hill
#

Hey all. I have a project that extends some of the HA Assist functions. I'm trying to set things up so that when MA is playing media and the user issues the wake word that the current MA volume is lowered so that the lyrics of the song playing are not picked up as part of the request. I see the attached options on my squeezelite player. Does this factor into what I am trying to accomplish?

low dove
#

That's just for tts announcements sent to the device while it is playing

#

people in the HA discord have written automations and scripts that can do area audio ducking when assist activates

swift phoenix
flint hill
tacit wind
swift phoenix
swift phoenix
# tacit wind Does it restore volume after the assist? What if the command is changing the vo...

It works like this:
triggered if pointed assist is not idle
Set volume of same area mplayers to 1/3 current value
Wait for assist to finish
Set volume of same area players to 3x current value
And that’s it. I’m not using assist for volume control. I don’t know of a way to store variables in automations. And the things I’ve tried were not working because of strange variable scoping in automation. So if you figure this out feel free to reuse any part of my blueprint. For now, I can imagine a volume limiter of some kind which will prevent this 3x volume action.

flint hill
# swift phoenix It works like this: triggered if pointed assist is not idle Set volume of same a...

I just took a look at the BP. Curious on your thoughts for a different approach. What if you allowed the user to set a default lower volume in the BP and then it would just be a matter of changing to that value and then reverting to the original when done?

My project pulls in a bunch of different satellite types (stream assist, HA satellite, Wyoming/ESPHome) so I would need to modify for the Assist trigger for all types as they are somewhat different than each other. It's a bit of a challenge to try to support all devices but so far so good.

View Assist - Adding visual feedback and extended functionality to Home Assistant voice

tacit wind
# swift phoenix It works like this: triggered if pointed assist is not idle Set volume of same a...

https://github.com/maxi1134/Home-Assistant-Config/blob/master/automations.yaml#L5117-L5228

Here is my code for this, I have a check removing volume raising if the voluime was changed in the meantime

GitHub

This is my Smart-home Installation repository. Contribute to maxi1134/Home-Assistant-Config development by creating an account on GitHub.

#

Maybe you want to add that to your blueprint

#
        - condition: template
          value_template: '{{ (state_attr(playing_chromecasts.0, ''volume_level'')
            | float | round(2, ''floor'') | float) == desired_volume  | round(2, ''floor'')
            }}'
swift phoenix