I can’t turn up the volume of Homepod
Opened this issue · 2 comments
My homepod is far away from my room and I can’t turn up the volume. Is there a solution?
Hi Tyler,
I found a workaround to turn up the volume on my HomePod mini. Just insert this script into Scripts.yaml which waits until the HomePod starts playing and it sets the desired volume (in this case 0.6 -> 60%).
script_set_homepod_volume:
alias: Script - Set HomePod volume async
sequence:
- wait_for_trigger:
- platform: device
domain: media_player
entity_id: media_player.living_room
type: playing
timeout: 00:01:00
continue_on_timeout: false
- service: media_player.volume_set
target:
entity_id: media_player.living_room
data:
volume_level: 0.6
mode: single
Then you can call the script from any other automation or script using script.turn_on service right before you broadcast music or TTS to your device. For instance if you want to set the volume before TTS:
script_tts_on_homepod:
alias: Script - Play TTS on HomePod
sequence:
- service: script.turn_on
target:
entity_id: script.script_set_homepod_volume
- service: tts.google_translate_say
data:
entity_id: media_player.living_room
language: en
message: "my homepod is loud"
mode: single
The key here is that you can only set the volume while the HomePod is playing. Scripts called from other automations or scripts are run asynchronous so this way you can do actions in parallel. Hope it can help.
@mate-b thanks!
Then you can call the script from any other automation or script using script.turn_on service right before you broadcast music or TTS to your device. For instance if you want to set the volume before TTS:
had to add device_id
to make it work using recent hass:
alias: Script - Set HomePod volume async
sequence:
- wait_for_trigger:
- platform: device
device_id: BedPod # <--
domain: media_player
entity_id: media_player.bedpod
type: playing
timeout: '00:01:00'
continue_on_timeout: false
- service: media_player.volume_set
target:
entity_id: media_player.bedpod
data:
volume_level: 0.6
mode: single