Commit graph

60 commits

Author SHA1 Message Date
epenet
75e52ef389
Use DOMAIN constant in plex (#78764) 2022-09-19 15:08:40 +02:00
Marc Mueller
5ae5ae5392
Improve debouncer typing (#75436) 2022-07-19 18:35:04 +02:00
J. Nick Koston
cd03c49fc2
Wait for config entry platform forwards (#73806) 2022-07-09 17:27:42 +02:00
jjlawren
cb1011156d
Rely on core config entry error logging in Plex setup (#73368)
Rely on core config entry error logging
2022-06-11 08:39:43 -10:00
Franck Nijhof
c3d19f3827
Clean up accessing device_registry helpers via hass (#72031) 2022-05-17 12:22:15 -07:00
jjlawren
016f67b855
Retry on more Plex connection failures during startup (#69822) 2022-04-10 22:25:19 -07:00
jjlawren
653305b998
Support multiple Plex servers in media browser (#68321) 2022-03-21 15:48:44 -07:00
jjlawren
1658d530e1
Add Plex scan_clients button, enable autoscan (#67055)
Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
2022-02-22 16:34:48 -08:00
jjlawren
69ce03465d
Proxy Plex thumbnail images in media browser (#66702)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2022-02-19 20:25:33 +01:00
epenet
a63e5c7ded
Add type hints for config entry update listeners (#65412) 2022-02-02 03:36:04 -06:00
jjlawren
e17f1ea577
Support Plex in Sonos media browser (#64951)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-01-26 10:40:47 -08:00
epenet
7185e1140d
Add setup type hints to plex (#62883)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-29 18:05:56 +01:00
Ville Skyttä
19d25cd901
Change config entry state to an enum (#49654)
* Change config entry state to an enum

* Allow but deprecate EntryState str equality comparison

* Test fixes

* Rename to ConfigEntryState

* Remove str comparability backcompat

* Update new occurrences of strs cropped up during review
2021-05-20 19:19:20 +02:00
J. Nick Koston
3f3f77c6e6
Reduce config entry setup/unload boilerplate N-P (#49777) 2021-04-27 20:42:21 +02:00
J. Nick Koston
4cd7f9bd8b
Raise ConfigEntryAuthFailed during setup or coordinator update to start reauth (#48962) 2021-04-09 19:41:29 -10:00
jjlawren
be71d626c8
Improve Plex device handling (#48369) 2021-03-31 09:37:16 -07:00
jjlawren
d62297a28b
Add Plex library count sensors (#48339) 2021-03-31 13:57:16 +02:00
jjlawren
e42ca35c94
Bump plexwebsocket to 0.0.13 (#48330) 2021-03-25 19:12:12 +01:00
jjlawren
e5893ca42c
Trigger Plex GDM scans regularly (#48041) 2021-03-21 22:14:09 -07:00
jjlawren
411cc6542c
Move Plex->Sonos playback to built-in service (#45066)
* Move Plex->Sonos playback service from integration to platform

* Test against 'native' Plex media_players

* Add Plex to Sonos after_dependencies

* Remove circular dependency

* Raise exceptions in failed service calls

* Add test to forward service call from Sonos

* Additional Sonos->Plex tests

* Fix docstring
2021-01-13 15:24:44 +01:00
jjlawren
f2f935506e
Use Plex websocket payloads to reduce overhead (#42332)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-12-02 19:00:13 +01:00
Franck Nijhof
a092b4c204
Ensure Plex content_id in play_on_sonos service is a string (#43483) 2020-11-21 16:32:55 +01:00
jjlawren
e6e4c9cf59
Allow Cast to play Plex media (#41869)
* Allow Cast to play Plex media

* Add Plex to after_dependencies, add missing constant

* Extract function from Sonos service to allow media lookups

* Move to non-async method

* Check if media_id exists

* Add test to make codecov happy
2020-10-19 16:34:22 -05:00
jjlawren
c63c253b7f
Discover Plex clients using GDM (#39053) 2020-10-14 15:46:52 +02:00
jjlawren
8c4b571901
Plex websocket callback async cleanup (#40992) 2020-10-01 21:56:15 +02:00
jjlawren
b3464c5087
Remove unnecessary instance attribute in Plex reauth config flow (#41000)
* Avoid unnecessary instance attribute

* Don't need to enrich existing entry data
2020-10-01 21:38:57 +02:00
jjlawren
be9ff3bd66
Accept new Plex websocket callback payloads (#40773) 2020-10-01 09:57:45 +02:00
jjlawren
3596eb39f2
Add support to reauthorize expired Plex tokens (#40469) 2020-09-28 16:14:54 +02:00
jjlawren
4ebcbadfc2
Address Plex review comments (#39591) 2020-09-03 18:10:37 +02:00
jjlawren
cb1cf2238d
Add Plex service to refresh a library (#39094)
* Add Plex service to refresh a library

* Clean up rebase leftovers

* Re-run black

* Fix docstring

Co-authored-by: Charles Garwood <cgarwood@newdealmultimedia.com>

Co-authored-by: Charles Garwood <cgarwood@newdealmultimedia.com>
2020-09-02 13:56:41 -05:00
Ville Skyttä
b4bac0f7a0
Exception chaining and wrapping improvements (#39320)
* Remove unnecessary exception re-wraps

* Preserve exception chains on re-raise

We slap "from cause" to almost all possible cases here. In some cases it
could conceivably be better to do "from None" if we really want to hide
the cause. However those should be in the minority, and "from cause"
should be an improvement over the corresponding raise without a "from"
in all cases anyway.

The only case where we raise from None here is in plex, where the
exception for an original invalid SSL cert is not the root cause for
failure to validate a newly fetched one.

Follow local convention on exception variable names if there is a
consistent one, otherwise `err` to match with majority of codebase.

* Fix mistaken re-wrap in homematicip_cloud/hap.py

Missed the difference between HmipConnectionError and
HmipcConnectionError.

* Do not hide original error on plex new cert validation error

Original is not the cause for the new one, but showing old in the
traceback is useful nevertheless.
2020-08-28 13:50:32 +02:00
jjlawren
67312e2d42
Fix lookup by Plex media key when playing on Sonos (#38119) 2020-08-03 12:40:48 +02:00
jjlawren
a7dfa60208
Fix Sonos speaker lookup for Plex (#37942) 2020-07-17 18:18:53 -07:00
jjlawren
fe5bf96e5d
Catch additional exception for Plex account login failures (#37143) 2020-06-26 10:30:44 -07:00
jjlawren
fd1a8dd96c
Fix Plex when using local tokenless authentication (#37096) 2020-06-25 17:10:40 -07:00
jjlawren
d4d233536f
Fix missing options in Plex config entry (#36683) 2020-06-11 15:45:00 -07:00
jjlawren
9aac8482d5
Remove deprecated Plex YAML config (#36388) 2020-06-03 09:20:21 -07:00
jjlawren
4e74fae615
Playback on Sonos speakers from Plex integration (#36177)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-05-27 15:36:08 -07:00
jjlawren
116012680a
Add All wrapper to deprecated Plex schema (#34552) 2020-04-22 14:20:14 -07:00
jjlawren
fc8d41d024
Deprecate Plex YAML config (#34546) 2020-04-22 10:41:26 -07:00
springstan
8198970af9
Clean up ssl usage (#33960)
* Clean up ssl usage

* Revert config[CONF_SSL] from sonarr, radarr and mfi
2020-04-10 22:01:57 +02:00
jjlawren
6dfffb23c4
Fix Plex debounce wrapper (#33730)
* Fix debounce wrapper by converting to async

* Review suggestions
2020-04-06 09:57:51 -07:00
jjlawren
312af53935
Handle Plex certificate updates (#33230)
* Handle Plex certificate updates

* Use exception in place

* Add test
2020-03-28 21:02:29 -07:00
Paulus Schoutsen
1615a5ee81
Use unique_id in Plex config entries (#32489) 2020-03-04 21:42:48 -08:00
Paulus Schoutsen
dd7d8d4792
Remove 'show all controls' option for Plex (#32391) 2020-03-04 14:42:50 -08:00
jjlawren
9cc47ca737
Add ConfigEntryNotReady exception to Plex (#32071) 2020-02-21 22:07:26 +01:00
jjlawren
0213f43f10
Add options to ignore shared/managed Plex clients (#31738)
* Add option to ignore shared/managed Plex clients

* Start to allow user selection

* hass object not ready during init

* Don't bother sorting

* Plex account multi-select, handle new users not matching config

* Fix/add tests

* Lint simplifications

* Review cleanup

* Oops

* Rename options attributes, fix/add tests
2020-02-18 16:46:45 -08:00
Bas Nijholt
e6eed4755f Sort imports according to PEP8 for plex (#29708) 2019-12-08 23:31:55 +01:00
jjlawren
2c00a9ec68
Fix Plex setup race condition v2 (#28943)
* Connect websocket when platforms ready, not when HA is ready

* Use callbacks from platform setup tasks instead

* Convert setup to async

* Apply suggestions from code review

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
2019-11-23 09:16:21 -06:00
jjlawren
a62bd97fa5 Delay Plex websocket connection to avoid race (#28934) 2019-11-21 12:39:24 -08:00