Hey everyone, I wanted to share my recent success in setting up an automation in Home Assistant that mutes my Yamaha receiver whenever my Sonos speaker starts playing. This was a bit of a challenge at first, but I managed to figure it out, and I thought I’d document the process for anyone else who might be tackling something similar.First, I started by creating a simple script using my Logitech Harmony remote to mute the Yamaha. This part worked perfectly, so I knew the issue wasn’t with the hardware itself but rather with the automation setup. My goal was to have this script trigger automatically whenever the Sonos player’s state changed to 'Playing.'I attempted to set this up using the automation editor in Home Assistant. Initially, I used the ‘state’ trigger with the condition ‘to: Playing’ for the Sonos entity. However, this didn’t work as expected. I spent quite a bit of time tweaking the configuration, trying different triggers and actions, but nothing seemed to get the automation to work consistently.After some research and a bit of trial and error, I realized that the issue might be with how the ‘state’ trigger was configured. I decided to switch to using the ‘event’ trigger instead, specifically monitoring for the ‘media_player.media_play’ event from the Sonos entity. This approach proved to be much more reliable.Here’s the final configuration that worked for me:yaml- id: ‘1591655461806’ alias: Mute Yamaha when Sonos Plays description: Mutes Yamaha Receiver when Sonos starts playing trigger: - platform: event event_type: media_player.media_play entity_id: media_player.great_room action: - service: script.mute_yamaha_receiver entity_id: remote.harmony_elite_hub_lrThis setup now reliably mutes the Yamaha receiver whenever the Sonos speaker begins playing, which is exactly what I was aiming for. It’s been working perfectly for the past few days, and I couldn’t be happier with the result.I want to give a special thanks to the Home Assistant community for all the helpful resources and forums that made this possible. If anyone else is struggling with similar automation issues, don’t hesitate to reach out—I’m more than happy to help if I can!