I’m fairly new to Home Assistant but I have it up and running with all my components. I’m switching to Lovelace now. I’m using a Fire HD tablet on the wall for lights, curtains, weather, etc. It all works great.
Now, I’d love to include a simple button with a logo -say NPR- so it plays the live http audio stream when pushed and stops playing when pushed again.
Does anybody think it can be done with HA/Lovelace?
It certainly can be done! The only challenge is choosing the right way to do this for you.
You could create a script that uses the media_player.select_source service and then plays the media. If you added that script to your front end or a lovelace entities card (or entity button, or glance, etc.) you would just have to click on it to turn on the stream.
Also, the media player on the front end includes a source list. The source list for my Sonos speakers is automatically populated by my Sonos favorites so I can easily select those from a drop down.