I need some help with an automation for the Denon AVR.
What I have:
A Denon AVR integration → media_player.denon_avr
A Denon HEOS integration → media_player.denon_avr_x3600h
A Bubble UPNP server, which manages my playlists and online streams.
Everything works fine with no any issues.
What is happening, I want to change:
Imagine, I start playing a playlist on Bubble UPNP, that contains 40 songs. Bubble starts playing. Denon AVR jumps on and Denon HEOS picks the playlist and displays the album covers.
So far, excellent.
Now my second half comes home and wants to watch TV. So she grabs the remote and switch the Denon AVR to source XS4ALL TV. The Denon AVR does that and she can watch the TV. Until Bubble UPNP sends the next song in my playlist. The Denon AVR automatically switches back to HEOS and plays the song.
Pretty annoying.
What I want to do now:
I would like to write an automation to stop the HEOS playlist, when any another source is selected on the AVR.
trigger - source change on Denon AVR
condition - playback of a playlist is active on HEOS
action - Pause the playlist on HEOS
That should stop this behavior.
So, why I did not make that automation already?
Well, because I do not know, how to work with those states of the media players exactly. In the UI I can’t find simple way to use the source change as a trigger.
So if someone, please, can help me get on the right track with this, I would be thankful
It still does not work. First I assumed, it did work, but coincidentally It was the last song from the playlist, that was played.
So, I found out now, that even, when I press PAUSE on the remote of the Denon, it does not work logically. The current song will be paused, but Bubble immediately sends the next song.
The clear playlist command does not work, even in developer tools. That’s, of course, because the playlist is managed by Bubble.
So I need to find a way to control Bubble directly from Home Assistant. Next challenge…
no, it does not. Just tested it in developer tools. It does accept pause, and that should be enough.
I had also tested pause in the automation. Did not work.
But now I tried developer tools, there pause works.
So, got back to basic and made this:
alias: Denon Heos off when TV
description: ''
trigger:
- platform: state
entity_id: media_player.denon_avr
attribute: source
to: XS4ALL TV
condition: []
action:
- service: media_player.media_pause
target:
entity_id: media_player.openhome_uuid_b31c8b21_7bf8_5831_0000_00003cc21c2d
mode: single
Still does not work. I’m now suspecting the trigger is not correct somehow…
Oh my… one simple automation, whole sunday on the run…
I have a working trigger, a working action, and still, the playlist has its own mind and will come back… Looks, like it somehow it gets out of PAUSE itself… pfffffffffffffffffffffffffffffff