Hello all. I’m still pretty new to HA and just now starting to get serious about the setup. One of the things I’m trying to do is use a slider to control the volume on a remote tablet.
So far, I can lower the volume on the tablet by using a script. The problem with this is that it’s a static number (volume is 0-10) and so I’ll need to tie the slider on the dashboard to the volume number. Here’s the script that works:
service: notify.mobile_app_tablet_01
data:
message: command_volume_level
data:
media_stream: music_stream
command: 5
The next step I’m trying to do is use a input number. This works with the following adjustment:
service: notify.mobile_app_nora_tablet_01
data:
message: command_volume_level
data:
media_stream: music_stream
command: ‘{{ states("input_number.norapadvolumelevel") | round }}’
The problem I have is that when HA sends the command, it’s sent as ‘5’ instead of just 5. Since there are single quotes in the command, the tablet just doesn’t do anything with it.
Any ideas on how I can remove the single quotes from the command? Or perhaps I’m just going at this task in a more difficult method than it should be?
Thank you all for your time.