Playlist Sensor
See original GitHub issueWould it be possible to have a sensor similar to the device sensor for playlists?
The use case for this is I have several media presets for various things (wake media, sleep media, arrive home media etc.) which are used to launch spotify using the spotcast service. Currently I have to manually get the URI and put the playlist name and playlist URI in a template to populate an input select entity and play the associated playlist.
A sensor with a dictionary of the playlists retrieved by spotcast would facilitate the automation of this process and automatically keep the playlist list up to date in HA when they are changed in Spotify.
I see the API info in the readme, but I’m not sure what to do with that. Perhaps an example for using the API would make this request redundant?
Example playlist template.
>
{% if playlist == 'Shower Songs' %} spotify:playlist:37i9dQZF1DWSqmBTGDYngZ
{% elif playlist == 'All Out 60s' %} spotify:playlist:37i9dQZF1DXaKIA8E7WcJj
{% elif playlist == 'All Out 80s' %} spotify:playlist:37i9dQZF1DX4UtSsGT1Sbe
{% endif %}
Thank you for taking the time to consider this.
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (6 by maintainers)
Top GitHub Comments
It turns out I need to refactor spotcast quite a lot to implement this so I can’t promise when this can happen but I will look into it.
is anyone interested in this? I’ve refactored the code so I cab make this happen now