Hi, I have a LG soundbar with google assistant built in. It has some bug where the sound is muted when the TV is turned off, which is annoying if you want to then cast some music. So I have the below automation, which unmutes the soundbar when TV is turned off. So far so good. But I also want to put the soundbar to sleep as unmuting wakes it.
Having tested the services, media_player.turn_on sends a cast command (with accompanying ‘bing’ from the device) and media_player.turn_off does nothing. I believe this is because Home Assistant detects the soundbar as a google cast device.
Is there a way to treat this device as a standard media device?
- id: '1614248855928'
alias: Unmute Soundbar on TV off
description: ''
trigger:
- platform: state
entity_id: media_player.sony_bravia_tv
to: 'off'
for: 00:00:05
condition: []
action:
- service: media_player.volume_mute
data:
is_volume_muted: false
entity_id: media_player.soundbar
- service: media_player.turn_off
data: {}
entity_id: media_player.soundbar
mode: single