Disclaimer:
I’m not familiar with the media_player component so I’m making an assumption that the attribute’s name and state, as you’ve described them, are correct.
thanks for the suggestion. but when i try that nothing happens…same as my original code. I’ve tried a couple different media players with no luck. Nothing shows up in the logs either.
Go to Home Assistant’s States page and get a screenshot of media_player.main and all its attributes. Post the image here so we can review it. The problem may be due to the choice of the attribute’s state.