So I’m new to Home Assistant but I’m looking to do something that seems pretty easy. I just want my Yamaha Receiver to mute when my Sonos (media_player.greatroom) starts playing. I have a script that uses my Logitech Harmony remote to mute the receiver and it works fine. I just can’t seem to get the automation working to run the script when the Sonos state goes to Playing. This is what I currently have in the automations file:
- id: '1591655461806'
alias: Mute Yamaha when Sonos Plays
description: Mutes Yamaha Receiver when Sonos starts playing
trigger:
- entity_id: media_player.great_room
platform: state
to: Playing
action:
- data: {}
entity_id: remote.harmony_elite_hub_lr
service: script.mute_yamaha_receiver
Media_player typical states are idle, paused, playing, off. I’ve also seen unknown and likely there are others. If you use off make sure you put quotes around it to avoid matching issues.
The dashboard shows the Sonos is paused when not playing and playing when there is something playing. I’ve tried using the from tag as well but that didn’t work either.