Simple automation gives me a headache

I just want to turn on my subwoofer (identity switch.bfaf415ff051a746434b9t) when my Denon ‘Home Theater’ (identity media_player.home_theater) is switched on.
How difficult could it be?


- id: '1610223008603'
  alias: Subwoofer / Denon On
  description: Schakel subwoofer in als Denon wordt ingeschakeld
  - platform: state
    entity_id: media_player.home_theater
    from: 'off'
    to: 'on'
  condition: []
  - type: turn_on
    device_id: d38b9fbe19d62ab6a7f2dd0fb2256eb9
    entity_id: switch.bfaf415ff051a746434b9t
    domain: switch

If I execute the automation my switch turn on so the problem should be the trigger.

Schermafbeelding 2021-01-09 om 21.31.04
Schermafbeelding 2021-01-09 om 22.17.05

Many changes from off to on and vice versa but the switch never changed…

Problem solved. The Denon AVR has 2 entities for some reason:
media_player.home_theater and media_player.home_theater_2
and actually a 3th entity for the 2th zone: media_player.home_theater_zone2

I had a look in the integrations
Schermafbeelding 2021-01-09 om 22.38.27
and found that media_player.home_theater belongs to the HEOS integration, while media_player.home_theater_2 and media_player.home_theater_zone2 are for the Denon integration.

Simply used identity media_player.home_theater_2 and automation worked!