I would like to remotely control the volume of my phone within the dashboard. I created a slider “input_number.serenity_phone_volume_level” as shown in the screenshot.
In the dashboard, it looks like this.
In the automation, I am using this as a trigger.
platform: state
entity_id:
- input_number.serenity_phone_volume_level
from: null
to: null
id: Serenity-Phone-Volume-Change
The trigger works because my mobile phone gets the notification.
Now, let’s look at the actions.
service: notify.mobile_app_moto_g_stylus_5g_antonio
data:
message: command_volume_level
data:
media_stream: music_stream
value: {{ states('input_number.serenity_phone_volume_level')| int }}
The above is not working. I really do not know how to bring in a value of an entity into an automation.
What I want to happen is that when I change the value from 0 to 20, it will change the volume on my phone to that changed number. I know that “command_volume_level” works when I set it within an automation using:
service: notify.mobile_app_moto_g_stylus_5g_serenity
data:
message: command_volume_level
data:
media_stream: music_stream
command: 20
The above sets it to the higher number.
What I want to do is set the volume from 0 to 20 based on what I changed in the entity “input_number.serenity_phone_volume_level”.
Any help would be appreciated. Thanks!!!