Help with code for my home theater using custom feature card

Hi everyone, I’m new to Home Assistant and a bit overwhelmed by all the features. I’m trying to integrate my home theater setup into HA because I’m tired of juggling five different remotes.

Now to my issue: I downloaded the custom_feature_card from HACS and have been experimenting with it. I’m starting to hit a wall, though. I’ve attached a screenshot showing how I want it to look in the end.

So far, I’ve managed to get the power button, volume control, and source selection working (which took me all day!). What I can’t figure out is how to switch between my projector and TV.

I have a Denon 3800X receiver, with the projector connected to Monitor 1 and the TV to Monitor 2. Can anyone help me with this?

This is the Code i have already:

features:
  - type: custom:service-call
    entries:
      - type: toggle
        entity_id: media_player.denon
        tap_action:
          action: toggle
          target:
            entity_id: media_player.denon
          data: {}
        icon: mdi:power
      - type: selector
        entity_id: media_player.denon
        options:
          - entity_id: media_player.denon
            option: Dolby Atmos
            tap_action:
              action: perform-action
              perform_action: media_player.select_sound_mode
              data: {}
              target:
                entity_id: media_player.denon
            value_attribute: sound_mode_list
            label: Dolby Atmos
            icon: mdi:dolby
          - entity_id: media_player.denon
            option: Multi Channel
            tap_action:
              action: perform-action
              perform_action: input_select.select_option
              data: {}
              target:
                entity_id: media_player.denon
            icon: mdi:speaker-multiple
            label: Multi Kanal
          - entity_id: media_player.denon
            sound_mode: Auro3D
            tap_action:
              action: perform-action
              perform_action: media_player.select_sound_mode
              data:
                sound_mode: Auro3D
              target:
                entity_id: media_player.denon
            icon: mdi:rotate-3d
            label: Auro-3D
        value_attribute: sound_mode_list
  - type: custom:service-call
    entries:
      - type: selector
        entity_id: media_player.denon
        options:
          - entity_id: media_player.denon
            tap_action:
              action: perform-action
              perform_action: input_select.select_option
              data: {}
              target:
                entity_id: media_player.denon
            label: Beamer
            icon: mdi:projector
          - entity_id: media_player.denon
            tap_action:
              action: perform-action
              perform_action: input_select.select_option
              data: {}
              target:
                entity_id: media_player.denon
            label: Fernseher
            icon: mdi:television
  - type: custom:service-call
    entries:
      - type: selector
        entity_id: media_player.denon
        options:
          - entity_id: media_player.denon
            option: Apple TV
            tap_action:
              action: perform-action
              perform_action: media_player.select_source
              data:
                source: Apple TV
              target:
                entity_id: media_player.denon
            label: AppleTV
            icon: mdi:apple
            type: button
          - entity_id: media_player.denon
            option: Playstation
            tap_action:
              action: perform-action
              perform_action: media_player.select_source
              data:
                source: Playstation
              target:
                entity_id: media_player.denon
            label: Playstation
            icon: mdi:sony-playstation
            type: butto
            styles: ""
          - entity_id: media_player.denon
            option: BD PLAYER
            tap_action:
              action: perform-action
              perform_action: media_player.select_source
              data:
                source: BD PLAYER
              target:
                entity_id: media_player.denon
            label: BluRay
            icon: mdi:disc
            type: button
          - entity_id: media_player.denon
            option: Schallplatte
            tap_action:
              action: perform-action
              perform_action: media_player.select_source
              data:
                source: Schallplatte
              target:
                entity_id: media_player.denon
            label: Schallplatte
            icon: mdi:album
            type: button
          - entity_id: media_player.denon
            option: Kasette
            tap_action:
              action: perform-action
              perform_action: media_player.select_source
              data:
                source: Kasette
              target:
                entity_id: media_player.denon
            label: Kassette
            icon: mdi:cassette
            type: button
          - entity_id: media_player.denon
            option: Bluetooth
            tap_action:
              action: perform-action
              perform_action: media_player.select_source
              data:
                source: Bluetooth
              target:
                entity_id: media_player.denon
            label: Bluetooth
            icon: mdi:bluetooth
            type: button
        value_attribute: source_list
        styles: ""
    styles: ""
  - type: media-player-volume-slider
type: tile
entity: media_player.denon
features_position: bottom
vertical: false
grid_options:
  rows: 1
  columns: full
tap_action:
  action: none
hide_state: false
state_content:
  - source
  - sound_mode

I don’t use feature cards, but I think you’re missing value_attribute for current state…

Hi, not to overwhelm you more, but for remotes, you could also have a look at the Universal Remote Card. They have some pretty good examples listed.

1 Like

thanks for the hint!

Thanks for the hint. I’ll try to incorporate that. I also wanted to show which source is currently selected, which hasn’t worked so far. Maybe this is the solution.