Hi i have written the following script, that is ought to decrease the volume of the media player by 5% in reference to the current volume as the main idea. but it does not work. As the media player im using a denon avr. thank you for any suggestions/support
service: media_player.volume_set
data:
volume_level: >
{% set decrease_factor = 0.95 %}
{% set current_volume = state_attr('media_player.living_room', 'volume_level') | default(0) | float %}
{{ [current_volume * decrease_factor, 0.01] | max }}
target:
entity_id: media_player.living_room