Several people want Home Assistant to control Spotify.
Well… it is possible. And you only need to buy 1 app for simple things
Essentially unified remote is an app to control things with your phone. It has simple spotify controls in the free version
How to tell it what to do? Enter “Tasker”, n automation tool for android. It has a trial but no free version.
How to get HA to talk with Tasker? There is another app, AutoApps. It can accept “commands” to push into tasker.
How to get a command to AutoApps? Well, I created a Join notifier component that can send commands to AutoApps. So of course you also need Join.
Now how do those work together? Simple example.
You want to play/pause for a certain HA event. Set up your event to send a Join notification to your phone with the message “sp”
In Tasker add a Profile with the Condition Event -> Plugin -> AutoApps -> CommandFilter: “sp”
Add an action to the Profile Plugin -> Unified Remote -> Remote Action -> Spotify -> Play pause
Now when your notification in HA is triggered it’ll go through all those apps to toggle your play/pause status.
I haven’t found a way to select specific tracks, but at least you can play/pause/next.
That’s it for now, at least for some of you spotify fans this might be helpful