I’m trying to setup a volume slider for Google Home. Here’s the code I have so far, but it doesn’t work:
input_slider:
google_home_volume:
initial: 0.27
min: 0.09
max: 1.00
step: 0.09
automation:
- alias: "Google Home - Adjust Volume"
trigger:
platform: state
entity_id: input_slider.google_home_volume
action:
- service: media_player.volume_set
data_template:
entity_id: media_player.google_home
volume_level: '{{ states.input_slider.google_home_volume.state }}'
Here are some scripts I have that do work setting the volume level:
google_home_volume_01:
sequence:
- service: media_player.volume_set
data_template:
entity_id: media_player.google_home
volume_level: 0.1
google_home_volume_02:
sequence:
- service: media_player.volume_set
data_template:
entity_id: media_player.google_home
volume_level: 0.2
google_home_volume_03:
sequence:
- service: media_player.volume_set
data_template:
entity_id: media_player.google_home
volume_level: 0.3
Any help would be appreciated :slight_smile: