Universal media_player volume_set entity takes value

I am trying to set up a universal media player to control volume.

The documentation shows how to pass a value through to an entity that takes volume_level, but my entity is an input slider (or conceivably a template, but that’s no more clear):

    volume_set:
      service: media_player.volume_set
      data_template:
        entity_id: media_player.receiver
        volume_level: ''

I want:

    volume_set:
      service: input_slider.select_value
      data_template:
        entity_id: input_slider.inpt_vol
        value: INTERNAL PARAMETER OR TEMPLATE??

Anyone got an idea?

Oops fixed second example (I had volume level in both).
Are the empty ‘’ actually passing an argument along to the specified entity that takes volume_level? If so, can I reference this parameter?

I know this is an old topic, but it took me hours to figure out the issue. The docs are wrong (but the docs in the current branch in github is correct).

The following is the correct syntax:

volume_set:
  service: media_player.volume_set
  data_template:
    entity_id: media_player.receiver
    volume_level: '{{ volume_level }}'
3 Likes