Input Number (Volume)

I’s trying to follow how this one was made but unable to replicate it.

https://community.home-assistant.io/t/using-sliders-input-number-for-volume-and-dimming/72166/2

I’m confuse where to get or how to create this part

  action:
  - service: media_player.volume_set

and this part

      entity_id: media_player.bnc

Is there a prerequisite in creating this?
TIA

Do you have a media player integrated into Home Assistant?

I do not have a media player in my HA but I have a Broadlink device that will control my normal TV. Clicking it manually, it works well but not working when I am using a slider.

I set up these codes for the sake of complying with the service: media_player.volume_set but I’m honestly not sure if this is correct.

- platform: universal
  name: 3F Itechie TV
  children:
  - media_player.3f_itechie_tv
  commands:
    turn_on:
      service: switch.toggle
      entity_id: switch.3f_br_remote_itechie_power 
    turn_off:
      service: switch.toggle
      entity_id: switch.3f_br_remote_itechie_power 
    volume_up:
      service: switch.toggle
      entity_id: switch.3f_br_remote_tvplus_volumeup
    volume_down:
      service: switch.toggle
      entity_id: switch.3f_br_remote_tvplus_volumedown
    volume_mute:
      service: switch.toggle
      entity_id: switch.3f_br_remote_tvplus_mute
    volume_set:
      service: script.turn_on
      data_template:
        entity_id: script.set_vol_sala
        variables:
          vol: '{{ volume_level * 100 | int }}'
    select_source:
      service: script.turn_on
      data_template:
        entity_id: script.select_source_sala
        variables:
          source: '{{ source }}'
  attributes:
    volume_level: input_number.3f_itechie_volume
    state: binary_sensor.tv_sala
    source_list: input_select.source_tv_sala|options
    source: input_select.source_tv_sala|state