Releases: fondberg/spotcast
v3.6.25
v.3.6.24
New functionality
- Added random_cateogry method. Which lets the user provid a playlist category and Spotcast will return a random playlist from the category to play. See https://developer.spotify.com/console/get-browse-categories/ for a list of categories. Credit to @maxenced
- Market localisation is now possible in Spotcast. A new parameter
country
was added. This parameter can be provided at the service call or added to the configuration file directly. In order for the sensor to be localised, the parameter must be added in the sensor section as well in the configuration file.
Main configuration exemple
spotcast:
sp_dc: !secret felix_sp_dc
sp_key: !secret felix_sp_key
country: CA
accounts:
felix:
sp_dc: !secret felix_sp_dc
sp_key: !secret felix_sp_key
mellissa:
sp_dc: !secret mellissa_sp_dc
sp_key: !secret mellissa_sp_key
Sensor configuration exemple
sensors:
- platform: spotcast
country: CA
Bug fix and improvement
- Spotcast will now validate the uri provided to make sure it is a valid URI before sending it to spotify API. If the URI is invalid a clear error message will be sent to the log explaining the problem in the URI.
v3.6.23
v3.6.22
thank you @hmmbob for the pr
2021.12.0 has a bump of pychromecast, which changes the way you can retrieve Chromecast info.
home-assistant/core#59719
home-assistant/core#60205
With the changes in this PR I fixed the issue locally. It should be tested by others too.
Also implemented a fix for a warning on device_state_attributes while I was at it anyway - this is just a rename to extra_state_attributes
Fixes #269
Fixes #273
Fixes #274
Fixes custom-cards/spotify-card#170
v3.6.21
v3.6.20
Support additional playlist types in get_playlists
@gmcmicken added additionnal playlist types in get_playlists
User playlists selected by "user" "default", or "". Featured selected by "featured", and everything else to be sent to Spotify API to match a users personalized playlists.
// Retrieve playlists
const res = await this.props.hass.callWS({
type: 'spotcast/playlists',
playlist_type: 'featured', // 'user' for saved playlists, 'featured' for spotify featured, or personalized view id
country_code: 'SV', // Optional country code used by featured playlists
limit: 20, // Optional limit, default is 10
account: 'ming' // optional account name
});
Bug fix
- regression found in #255, potential race condition. Reverted the change, but kept the error log
Fix error callback on bad install
Fixed an error that caused spotcast to enter an error state when the official Spotify Installation is not configured in home assistant. The fix does a check at the start of the script. If the spotify integration is missing, spotcast will send an error log explaining the missing component and exit.
Correction for:
Added search to service
@kylepotts added Search 🥇
It works by providing the data field "search" ie:
service: spotcast.start
data:
entity_id: media_player.cuisine
random_song: true
shuffle: true
search: between the buried and me
Currently the code will only do a search request if the Uri field is empty. The flow of the search is has followed:
Intercept if Uri is none or empty
Get the most relevant result from each searchType (artist, album, track, and playlist)
Sort the results according the most identical to the search query
Set the Uri to the one of the results in index zero of the list
Continue the usual flow of the component
...
In case multiple results are identical, the priority will be artist->album->track->playlist. Let's take the search exemple "Between the buried and me". We have a song called "between the buried and me" on an album of the same name from a band of the same name. The uri that is returned will be the one from the artist.
Fix playlist sensor
Fix playlist sensor