How to use conditional cards?

image

Hey, im pretty new to ha and got this setup working for my tv.
I only want to show the buttons below when the tv is on so i assumed i would need the conditional card.

This is what i tried so far.

type: custom:mini-media-player
icon: mdi:television
name: Niclas Fernseher
entity: media_player.niclas_fernseher
hide:
  volume: false
  source: false
  power_state: false
  controls: true
card:
  type: conditional
  conditions:
    - entity: media_player.niclas_fernseher
      state: 'on'
  shortcuts:
    buttons:
      - icon: mdi:youtube
        artwork: material
        type: service
        name: YouTube
        id: media_player.select_source
        data:
          entity_id: media_player.niclas_fernseher
          source: YouTube

Got it working now, needed to use two different conditonal cards