There is another script for Volume Up and they both work fine, in principle.
But I’m looking for a solution to adjust the volume in smaller increments than the 10% steps that the standard volume_up/volume_down service seems to offer.
I could probably retrieve the current absolut volume value, calculate what the value for a 5% increase would result in, and push it with a media_player.volume_set final step.
I’m wondering, though, if there’s a simpler solution, maybe similar to what I’m using for my thermostat:
alias: A/C S&W One Down
sequence:
- data_template:
entity_id: climate.lyric_gerstmeyers_thermostat
temperature: >-
{{ state_attr('climate.lyric_gerstmeyers_thermostat', 'temperature')|int - 1 }}
service: climate.set_temperature
I’m looking for a solution that I can implement with e.g. an icon in a glance card, not an input_number slider - that’s way too fidgety on a phone.
That’s why I was thinking about retrieving the current value and pushing the new one rather than dealing with the limitation that comes with using the increments of the media_player.volume_down service.
Figured it out, though.
My issues were - once again - with the indentations and quotes when using a template:
@chairstacker This helped me since I have a similar issue with the 10% increments on my Anthem receiver. Thanks for posting your solution.
But, I’m also finding that I cannot seem to get a Volume Up and Down script to both load. All I’m changing is the name, alias, and sign of the increment in the template, but after reloading Scripts, I only see one of them under services. Did you run into this as well?
I got it to work. I think I had an indentation error from copy/pasting.
Now that I have it working though, I’m much more aware that one of my receivers has a linear volume response while the other seems to be a 4th order polynomial. It should be logarithmic, but not so.