HA Harmony Remote Automatic Volume

Hi, so i am a total beginner when it comes to Home Assistant.
I did some work with it now and i love it. I want to do more but have not many ideas which can be done with HA, but thats another problem.

One of my ideas is to change the volume on my AVR (which has no network) when i change the action to my nintendo switch. All of my devices have around the same volume but the nintendo switch is very loud.

I also set the option on my AVR to control the volume to always have the same outcoming volume but that doesn’t seem to work.

So now i want to have an automation when i come from on action to my nintendo switch action the volume should go down from 18 to 10. Because there are no information about volume so i think i will have to lower the volume 8 times.
The same thing should start if i come from the nintendo switch to another action it should higher the volume 8 times.

I know its not perfect but i don’t want to buy another AVR. Is there a way to do this?
My AVR is the Sony STR-DH540 and i only have a logitech harmony hub to accomplish this.

Thank you

Totally foget that my harmony can do the same with start and end sequences in my actions.

Anyway i found this script to control the volume. maybe this helps someone

volume_up:
alias: Volume Up
sequence:

  • service: remote.send_command
    data_template:
    entity_id: remote.harmony_hub
    command: VolumeUp
    device: 50815479
    num_repeats: 8
    delay_secs: 0.25
    mode: single
    volume_down:
    alias: Volume Down
    sequence:
  • service: remote.send_command
    data_template:
    entity_id: remote.harmony_hub
    command: VolumeDown
    device: 50815479
    num_repeats: 8
    delay_secs: 0.25
    mode: single
2 Likes