Receiver not turning ON

Hi Guys, I hope anybody can help me. I’m pretty new to HA.

What I try to to achieve is:
Turning on my receiver when I stream from a Google Home to a Chromecast. And when I stop streaming to turn off the receiver. In both cases I need to change the source.

Turning OFF and changing the AV3 works like a charm. But turning does not work at all and I have no glue whats going wrong.

Below is what I created with the Assistent for Automations.

Thanks in advance.

- id: '1636028526076'
  alias: Receiver turn on and change source
  description: when Chromecast is activ
  trigger:
  - platform: state
    entity_id: media_player.wohnzimmer
    from: off
    to: playing
    for:
      hours: 0
      minutes: 0
      seconds: 2
      milliseconds: 0
  condition: []
  action:
  - service: media_player.turn_on
    target:
      entity_id: media_player.yamaha_receiver
  - service: media_player.select_source
    target:
      entity_id: media_player.yamaha_receiver
    data:
      source: HDMI4
  mode: single
- id: '1636029055909'
  alias: Turn off receiver when Chromecast stops
  description: ''
  trigger:
  - platform: state
    entity_id: media_player.wohnzimmer
    from: playing
    to: off
    for:
      hours: 0
      minutes: 0
      seconds: 2
      milliseconds: 0
  condition: []
  action:
  - service: media_player.select_source
    target:
      entity_id: media_player.yamaha_receiver
    data:
      source: AV3
  - service: media_player.turn_off
    target:
      entity_id: media_player.yamaha_receiver
  mode: single