Is template sensor the best option to solve my problem?

can you call the service to set the volume level of the slider to an increment of 5? I still find it odd that it’s set to a random level inside your env. Mine is constrained to the 5’s with a near configuration. I think that may be the problem.

You can always remove the condition too. It won’t do much other than make a second post of your volume level.

hashing out both the condition blocks seems to get me closer… but im wondering if the conditions are failing due to the calculation of -dB not being quite right:

You’ll see in the image that dragging the slider to 45 doesn’t set the amp to 45, but 42. The scrape sensor is getting the actual dB level via http.

It seems like that would be the problem. And it seems like the problem is on Denon side. That volume level should be perfectly on the 0.0x decimal place. It’s no where near that. Sometimes it falls perfectly, it’s odd. Removing the condition would keep it working. If you’re interested in making it perfect, I need you to get a list of numbers in db, and match it to a list of volume_levels. From there we can tailor the equation to match better. You want to span the whole range. So from min volume to max volume.

thanks @petro. i’ve taken a slightly different route which seems to be exactly what i was after:

i’ve got my input_number as it was:

  denon1_receiver:
    name: Zone 1 Volume
    initial: -80
    min: -80
    max: 0
    step: 5
    unit_of_measurement: dB

but the automation for volume control using the slider now triggers the curl command that sends the input_number directly to the receiver without any changes:

- id: denon_vol
  alias: denon_vol
  trigger: 
    platform: state
    entity_id: input_number.denon1_receiver
  action:
    service: shell_command.set_denon_vol

and the shell command that calls:

set_denon_vol: '/usr/bin/curl "http://192.168.1.113/MainZone/index.put.asp?cmd0=PutMasterVolumeSet%2F{{ states.input_number.denon1_receiver.state }}"'

so the setting of the volume is instant and can keep up with very quick changes. perfect!

and to have the receiver’s volume change the input_slider, i’m still using the curl command to grab the value and this updates the slider:

- id: denon_media_to_slider
  alias: Zone 1 Volume (Media to Slider)
  trigger:
    - platform: state
      entity_id: sensor.denon_volume
  action:
     service: input_number.set_value
     data_template:
       entity_id: input_number.denon1_receiver
       value: '{{ trigger.to_state.state | int }}'

so thanks to everyone for their input - it all helped me get to this outcome!