Anyone know why Google Home/Chromecast devices respond to “media_player.turn_on” by toggling on and off? It’s really messing up some of my automations when a Google device is already on and the automation turns it off by mistake. This behavior doesn’t happen on my Logitech Media Players.
not sure, but my understanding is that when you turn on a chromecast media player it attempts to connect to it to send some audio
if you’re already playing audio on that device, it will most likely stop the stream to initiate a new one (which is missing if all you’ve done is to turn it on)
you probably need to understand why they’re turned on “by mistake” and set some conditions to avoid turning on if the state is different than on…
Not exactly the problem I’m facing. I’m trying to keep them turned on but sending a “turn_on” while already on, causes them to turn “off”
Lol! Thanks, that’s my post. Sending the silent mp3 was my work around to not getting the “turn_on” command to solve the issue. Cheers
LOL just implemented this today based in your post
Nice- I just edited the post to reflect one little adjustment. I found the wake-up ping was failing about once every 45 minutes so I changed the frequency to 2-minutes. Now there are two chances to hit the mark in every 5-minute sleep cycle. Seems to be 100% reliable now.
I use this script to turn it on:
alias: “Turn on Google Home”
- condition: state
- service: media_player.turn_on
- delay: ‘00:00:03’
So if it is already on, then leave it