i’m using the following:
input_number:
mopidy_volume:
name: 'Mopidy Volume'
min: 0
max: 100
step: 1
rest_command:
mopidy:
url: http://192.168.0.186:6680/mopidy/rpc
method: POST
payload: '{{ body }}'
content_type: 'application/json'
timeout: 10
automation:
- alias: Mopidy Volume
initial_state: 'on'
trigger:
platform: state
entity_id: input_number.mopidy_volume
action:
- service: rest_command.mopidy
data_template:
body: '{"method": "core.playback.set_volume","jsonrpc": "2.0","params": {"volume": {{states("input_number.mopidy_volume")}} },"id": 1}'
moving the input_number slider isn’t setting the volume (i see no errors but it doesn’t work).
if i replace {{states(“input_number.mopidy_volume”)}} with a static 90, moving the slider executes the command successfuly and the volume is being set to 90.
what am i missing here?