Use Input Select in Lovelace Config

Hello all, I am trying to use an input_select state in my config for the harmony card. Basically the harmony card asks for a device to send commands to, and my goal is to use one card and use the input_select to tell the card what device to point the commands to.

Here is a snippet of where I have gotten so far:

activities:
  - name: Watch Apple TV
    device: {{states('input_select.arman_s_room_devices')}}

But then I get this error Failed to call service remote/send command, value should be a string for dictionary value @ data[ device]

Anyone know if this is possible?

Most core Lovelace cards do not support templating.

Your options are:

  1. Call a script with a tap action. Put the template in the script.

Or,

  1. use this:

This was exactly what I needed. For anyone in the future here was my final result:

type: custom:config-template-card
variables:
  DEVICE: states['input_select.arman_s_room_devices'].state
entities:
  - input_select.arman_s_room_devices
card:
  type: custom:harmony-card
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  activities:
    - name: Watch Apple TV
      device: ${ DEVICE }
      icon: mdi:television