Commit Graph

36 Commits (aa9b99713c70935c8c0b2cda436b8eb5d214d984)

Author SHA1 Message Date
Maciej Bieniek f212049fc2
Add constructor return type in integrations O-S (#50896) 2021-05-20 15:58:17 +02:00
Milan Meulemans 29d72714f3
Replace dict with DeviceInfo (#49950)
* Replace dict with DeviceInfo

* Clean up

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-05-02 00:37:19 +02:00
Ruslan Sayfutdinov cbaeec2a4e
Use AddEntitiesCallback type, pt.2 (#49921) 2021-04-30 20:38:59 +02:00
J. Nick Koston 3fa8ffa731
Enable mccabe complexity checks in flake8 (#49616)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-04-25 12:38:40 +02:00
Philip Allgaier 9043a1f5aa
Raise Spotify exception if no active device found (#48486) 2021-03-30 16:54:33 +02:00
Marc Mueller a3cd1854f6
Update typing 12 (#48073) 2021-03-18 14:31:38 +01:00
Franck Nijhof 9b7ecddde6
Add reverse repeatmode mapping constant to Spotify (#43968) 2020-12-05 15:05:12 +01:00
Franck Nijhof db0dee1ab2
Add repeat mode support to Spotify (#43247) 2020-11-21 11:38:40 +01:00
Paulus Schoutsen 1fba245ff1
Catch correct error when Spotify has a request error (#43032) 2020-11-10 09:58:52 +01:00
Kevin Hellemun e929ae10cd
Fix Spotify scopes evaluation (#42819)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2020-11-09 00:46:26 +01:00
Bram Kragten fbf0e69558
Add children media class to children spotify media browser (#39953) 2020-09-12 10:35:51 +02:00
Martin Hjelmare e96fed20c8
Add children media class (#39902)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-09-11 13:08:13 +02:00
Bram Kragten b49e6243d1
Fix spotify media browser category (#39888) 2020-09-10 12:06:18 +02:00
Martin Hjelmare be04f14a78
Make spotify media class lookup more robust (#39841) 2020-09-09 14:48:28 +02:00
Martin Hjelmare 586d7eaba6
Add media class browse media attribute (#39770) 2020-09-08 16:42:01 +02:00
Paulus Schoutsen 5bcffba53e
Guard for spotify items without type (#39795)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2020-09-08 15:23:29 +02:00
Martin Hjelmare c3ee79e4db
Clean up spotify media browser dict access (#39764) 2020-09-07 22:17:10 +02:00
Philip Allgaier 84992da24a
Make Spotify library payload use "BrowseMedia" (#39744) 2020-09-07 17:52:35 +02:00
Bram Kragten 19818d96b7
Spotify browser add more sources (#39296)
Co-authored-by: Tobias Sauerwein <cgtobi@gmail.com>
2020-09-06 22:55:29 +02:00
Paulus Schoutsen df8daf561e
Browse media class (#39698) 2020-09-06 15:52:59 +02:00
cgtobi c8d49a8adf
Add Spotify media browser capability (#39240)
Co-authored-by: Tobias Sauerwein <cgtobi@gmail.com>
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2020-08-27 17:00:36 +02:00
Adam Liddell c3f63e0739
Fix media_content_id attribute in Spotify integration (#37853)
Previously, the media_content_id field would contain the track name, which
appears was a regression when the Spotify integration was rewritten in
7e4b9adc. The media_content_id now reverts to containing the Spotify
track 'uri' field, which has the form 'spotify:track:...'
2020-07-14 20:37:08 +02:00
rako77 ca6243c18a
Add missing typing to Spotify (#34698) 2020-04-26 21:25:58 +02:00
Erik Montnemery 62bc02fdda
Rename MediaPlayerDevice to MediaPlayerEntity (#34592) 2020-04-25 18:00:57 +02:00
Franck Nijhof 8272c71811
Handle query and anchors in Spotify URI's (#33084)
* Handle query and anchors in Spotify URI's

* Use yarl for cleaning up the URL
2020-03-21 12:24:23 -07:00
Franck Nijhof f396f1cb18
Spotify integration hotfixes (#31835)
* Remove services file, incorrect info

* Guard currently playing for being a NoneType

* Revert "Guard currently playing for being a NoneType"

This reverts commit f5f56b0db0.

* Guard currently playing item is None

* Process review suggestions
2020-02-14 22:58:39 +01:00
Franck Nijhof 7e4b9adc3d
Rewrite of Spotify integration (#30717)
* Rewrite of Spotify integration

* Update homeassistant/components/spotify/config_flow.py

Co-Authored-By: Paulus Schoutsen <balloob@gmail.com>

* Remove configurator dependency

* Strip whitespace from device model in case Spotify product is missing

* Ensure domain dict exists in hass data on setup entry

* Simply config validation for client id and secret

* Abort flow on any exception from spotipy

* Add tests for config flow

* Gen requirements all

* Add test package __init__

* Remove Spotify from coveragerc

* Made alias handling more robuust

* Fix supported_features for Spotify free and open accounts

* Improve error message in the logs

* Re-implement Spotify media_player

* Change media content type when play a playlist

* Process review suggestions

* Move Spotify init, static current user and supported_features

* Remove unneeded me call

* Remove playlist content type due to frontend issues

* Improve playlist handling, when context is missing

* Handle entity disabled correctly

* Handle being offline/unavailable correctly

* Bump Spotipy to 2.7.1

* Update coverage RC, mark integration silver

* Remove URI limitation, lib supports all Spotify URI's now

* Final cleanup

* Addresses Pylint error

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-01-24 18:47:22 +01:00
Ville Skyttä e6388e186c
Remove unnecessary string literal concatenations (#30360) 2020-01-02 21:17:10 +02:00
springstan 1495df374b Made spotify playlist name validation less strict (#28684) 2019-11-24 20:53:26 +01:00
springstan 26d19f9e1c Moved imports to top-level in spotify integration (#27703) 2019-10-15 17:12:12 +02:00
Franck Nijhof 445c741b30 Use literal string interpolation in integrations R-S (f-strings) (#26392) 2019-09-03 21:14:39 +02:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Leandro Loureiro dcb12a992a Add spotify service to allow to play music from playlist (#24991)
* adding custom service to Spotify component to allow to play random playlist music

* fixing findings

* improving naming

* improving way of using required parameters
2019-07-16 04:41:16 +02:00
cgtobi 2c07bfb9e0 Remove dependencies and requirements (#23024)
* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit fe7171b4cd.

* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit 391355ee2c.

* Remove dependencies and requirements

* Fix flake8 complaints

* Fix more flake8 complaints

* Revert non-component removals
2019-04-12 10:13:30 -07:00
Tobias Sauerwein 048b100eea Clean up docstrings (#22679)
* Clean up docstrings

* Fix long lines

* Fix more docstrings

* Fix more docstrings

* Fix more docstrings
2019-04-03 17:40:03 +02:00
Paulus Schoutsen f5076188ef
Consolidate all platforms that have no tests (#22096)
* Consolidate

* Fix tests

* Update imports

* Fix import

* Use importlib because integration and package share name

* Fix more tests

* Update .coveragerc and CODEOWNERS
2019-03-16 20:44:05 -07:00