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
epenet
8234625d30
Use Domain not Platform on test service calls ( #65508 )
...
* Adjust atag
* adjust broadlink
* Adjust onewire
* Adjust plex
* Adjust renault
* Adjust tasmota
* Adjust zha
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-02-03 14:16:35 +01: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
jjlawren
cdad1a9f27
Use local Sonos API for Plex music playback ( #63357 )
2022-01-25 21:10:11 -08:00
jjlawren
34d0f2ffd7
Add "Recommended" and radio station support to Plex media browser ( #64057 )
2022-01-25 13:02:23 -08:00
jjlawren
10195dc700
Improve server selection for Plex config flows ( #63408 )
2022-01-05 22:20:33 +01:00
Robert Hillis
75e8a2ec77
Use platform enums in plex tests ( #62561 )
2021-12-22 07:59:54 -05:00
Ville Skyttä
5bf67cac66
Use RegistryEntryDisabler ( #60436 )
2021-12-15 23:25:40 +02:00
Paulus Schoutsen
31153ac155
Move fixtures part 1 ( #58902 )
2021-11-01 20:47:05 -07:00
jjlawren
3672889609
Add warning if Sonos not linked to Plex ( #58150 )
2021-10-24 12:51:45 -10:00
jjlawren
0600a21e02
Allow advanced Plex `play_media` search options ( #56226 )
2021-10-24 11:22:16 -10:00
Ville Skyttä
380cff167e
Use HTTPStatus in components/[nop]* ( #58279 )
2021-10-23 20:56:30 +02:00
Paulus Schoutsen
a4d9019ffc
Refactor persistent notification to no longer route all data via a service ( #57157 )
...
* Convert persistent notification tests to async
* Create/dismiss persistent notifications in exposed functions, not service calls
* Fix notify persistent_notification
* Remove setting up persistent_notification
* Drop more setups
* Empty methods
* Undeprecate sync methods because too big task
* Fix setup clearing notifications
* Fix a bunch of tests
* Fix more tests
* Uno mas
* Test persistent notification events
* Clean up stale comment
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-07 12:58:00 +02:00
jjlawren
33541ab287
Shorten album titles when browsing artist ( #57027 )
2021-10-03 21:13:08 -07:00
jjlawren
2ff1fc83bc
Add latest added media as Plex library sensor attribute ( #56235 )
2021-09-29 17:11:53 -07:00
jjlawren
8f4ba564d4
Plex media browser improvements ( #56312 )
2021-09-29 11:17:55 -07:00
Erik Montnemery
acdddabe1f
Use hass_client_no_auth test fixture in integrations h-p ( #55583 )
2021-09-02 14:49:40 +02:00
jjlawren
d5fe7e0e5a
Fallback to try all known Plex servers if none marked present ( #53643 )
2021-08-24 12:05:24 +02:00
jjlawren
225732d00e
Remove I/O in Plex tests ( #53196 )
2021-07-19 18:50:04 +02:00
jjlawren
f39f087b10
More graceful exception handling in Plex library sensors ( #52969 )
2021-07-13 20:22:31 +02:00
jjlawren
d4ac5bf048
Bump plexapi to 4.6.1 ( #51936 )
2021-06-17 09:02:23 +02: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
jjlawren
37e8571fe8
Use header URI in Plex config flow ( #49915 )
2021-04-30 23:15:59 +02:00
jjlawren
8c311cbaa0
Handle special Plex library sections ( #49525 )
2021-04-28 19:58:05 +02:00
Ville Skyttä
153d6e891e
Use config_entries.SOURCE_* constants ( #49631 )
2021-04-25 11:27:40 +02: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
195d4de6cd
Bump plexapi to 4.5.0 ( #48264 )
2021-03-23 22:47:00 +01:00
jjlawren
2f1dba74d1
Use Plex server URL as config entry title ( #47010 )
2021-02-24 20:57:02 +01:00
jjlawren
425d56d024
Fix Plex showing removed shared users ( #46971 )
2021-02-23 23:36:46 +01:00
Paulus Schoutsen
9e07910ab0
Mark entities as unavailable when they are removed but are still registered ( #45528 )
...
* Mark entities as unavailable when they are removed but are still registered
* Add sync_entity_lifecycle to collection helper
* Remove debug print
* Lint
* Fix tests
* Fix tests
* Update zha
* Update zone
* Fix tests
* Update hyperion
* Update rfxtrx
* Fix tests
* Pass force_remove=True from integrations
Co-authored-by: Erik <erik@montnemery.com>
2021-02-08 10:45:46 +01:00
jjlawren
d7e0391e03
Allow Plex playback using provided playqueue ID ( #45580 )
2021-01-28 17:21:31 +01:00
jjlawren
1f66457a34
Separate Plex/Sonos cross-integration tests ( #45370 )
2021-01-21 11:22:19 +01: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
0426b211f6
Rewrite Plex tests to use mocked payloads ( #44044 )
2021-01-07 19:56:52 +01:00
Ville Skyttä
43474762b2
Drop remaining Python < 3.8 support ( #44743 )
...
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-01-04 11:47:29 +01:00
Franck Nijhof
65cf2fcb6f
Drop asynctest ( #44746 )
2021-01-01 22:31:56 +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
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
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
df9634a41f
Refactor Plex tests using fixtures ( #40260 )
...
* Refactor Plex tests using fixtures
* Avoid unnecessary coroutine declaration
2020-09-22 22:14:41 -05: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
jjlawren
dd7f282723
Add new Plex movie lookup method for media_player.play_media ( #39584 )
2020-09-04 11:32:36 +02:00
jjlawren
aecd74c6af
Add service to scan for new Plex clients ( #39074 )
2020-09-03 09:35:37 +02:00
jjlawren
d66bc6a873
Add Recently Added and On Deck to Plex media browser ( #39232 )
2020-09-03 09:26:30 +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
Franck Nijhof
1c2ebdf307
Upgrade black to 20.8b1 ( #39287 )
2020-08-27 13:56:20 +02:00
jjlawren
1bc4de2bd3
Add tests for Plex media browser ( #39220 )
2020-08-26 23:24:44 +02:00
jjlawren
67312e2d42
Fix lookup by Plex media key when playing on Sonos ( #38119 )
2020-08-03 12:40:48 +02:00
jjlawren
1d987b4846
Ignore remote Plex clients during plex.tv lookup ( #38327 )
2020-07-29 20:56:32 +02:00
jjlawren
a7dfa60208
Fix Sonos speaker lookup for Plex ( #37942 )
2020-07-17 18:18:53 -07:00
jjlawren
7128092139
Fix missing Plex account mocks in tests ( #37591 )
2020-07-06 22:58:43 -07:00
J. Nick Koston
bea3d841d2
Mock setup in plex test to prevent CI failure ( #37590 )
2020-07-06 17:25:22 -07:00
jjlawren
ba356c41e0
Fix Plex client controls when connected via plex.tv resource ( #37572 )
2020-07-06 15:16:41 -07:00
jjlawren
ec13eecc59
Update Plex tests to mock websockets ( #37147 )
...
* Update Plex tests to mock websockets
* Avoid unnecessary class mock
2020-06-27 10:03:51 +02:00
jjlawren
40573bf393
Plex tests cleanup and additions ( #37117 )
2020-06-25 23:24:58 -07:00
jjlawren
fd1a8dd96c
Fix Plex when using local tokenless authentication ( #37096 )
2020-06-25 17:10:40 -07:00
jjlawren
d445c16697
Handle Plex Live TV sessions ( #36919 )
2020-06-19 17:12:47 +02:00
jjlawren
d5cc3208af
Discover controllable Plex clients using plex.tv ( #36857 )
2020-06-17 12:04:47 -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
44d7169642
Fix flaky Plex test ( #36391 )
2020-06-02 17:37:10 -05:00
Quentame
1855c91988
Use CONF_CLIENT_ID & CONF_CLIENT_SECRET from homeassistant.const ( #36233 )
...
* Use CONF_CLIENT_ID & CONF_CLIENT_SECRET from homeassistant.const
* Fix pylint
* Use in tests
* Search for "client_id"
* Fix tests
* Fix test
* Fix test
2020-05-30 17:27:20 +02: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
59c112a3f2
Decouple media lookup from Plex play_media service ( #35663 )
...
* Decouple media lookup from play_media service
* More explicit input/search validation, cleanup, more tests
* Minor cleanup
* Normalize media_type string in lookup call
* Move key lookup, add tests via service calls
* Always allow play_media service calls
* No need to pass arguments to nested functions
2020-05-26 14:39:56 -05:00
jjlawren
c12f8bed43
Plex discovery on demand ( #35303 )
...
* Allow Plex discovery on demand
* Add new discovery source
* Add tests
2020-05-13 09:11:00 -04:00
jjlawren
ad419911bc
Add config option to ignore Plex Web clients ( #34708 )
2020-05-08 09:49:15 -07:00
Franck Nijhof
2223592486
Add get_url helper, deprecate base_url ( #35224 )
2020-05-08 02:29:47 +02:00
jjlawren
dfe2a457c0
Handle config with a limited Plex account ( #35218 )
2020-05-06 18:46:00 -07:00
jjlawren
740d9c575e
Add manual config flow for Plex ( #34476 )
2020-05-05 15:42:21 -07:00
Paulus Schoutsen
ec47216388
Use built-in test helpers on 3.8 ( #34901 )
2020-04-30 13:29:50 -07:00
Paulus Schoutsen
454c5d824a
Attempt to fix CI ( #34800 )
2020-04-28 10:31:22 -07:00
jjlawren
c582911879
Refactor Plex device/session updates ( #34616 )
2020-04-23 18:12:39 -07:00
jjlawren
42ca566e05
Improve Plex debounce/throttle logic ( #33805 )
...
* Improve Plex debounce/throttle logic
* Use Debouncer helper, rewrite affected tests
* Mock storage so files aren't left behind
* Don't bother with wrapper method, store debouncer call during init
* Test cleanup from review
* Don't patch own code in tests
2020-04-10 00:49:09 +02:00
jjlawren
d3a4270312
Plex logging additions & cleanup ( #33681 )
2020-04-04 23:21:20 -07:00
jjlawren
42353282d4
Debounce calls to Plex server ( #33560 )
...
* Debounce calls to Plex server
* Simplify debounce by recommendation
* Update tests to handle debounce
* Test debouncer, fix & optimize tests
* Use property instead
2020-04-03 22:34:42 -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
jjlawren
44c7743351
Rewrite and add Plex tests ( #32633 )
...
* Rewrite and add Plex tests
* Remove unnecessary mocks
* Explicitly import constants for readability
2020-03-11 09:37:02 -07:00
Paulus Schoutsen
4717d072c9
Remove discovery and legacy config file loading for Plex ( #32510 )
2020-03-05 12:36:18 -08: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
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
jjlawren
408b41ea02
Add device registry support for Plex ( #31797 )
...
* Add device registry support for Plex
* Fix model
* Use Plex server as sensor device identifier
2020-02-13 16:37:52 -08:00
jjlawren
1b2f4fa19f
Improve Plex media_player entity naming ( #31755 )
2020-02-12 09:55:18 -08:00
Jc2k
fdfedd086b
Rework FlowManager to use inheritance ( #30133 )
...
* Pull async_finish_flow/async_create_flow out of ConfigEntries
* Towards refactoring
* mypy fixes
* Mark Flow manager with abc.* annotations
* Flake8 fixes
* Mypy fixes
* Blacken data_entry_flow
* Blacken longer signatures caused by mypy changes
* test fixes
* Test fixes
* Fix typo
* Avoid protected member lint (W0212) in config_entries
* More protected member fixes
* Missing await
2020-01-03 11:52:01 +01:00
Bas Nijholt
e6eed4755f
Sort imports according to PEP8 for plex ( #29708 )
2019-12-08 23:31:55 +01:00
jjlawren
6a02c6540e
Stop Plex config flow imports where more user input needed ( #29241 )
...
* Abort imports that require user interaction, update logs and tests
* Disable lint
2019-11-30 22:07:12 -08:00
jjlawren
88441d5f68
Reduce connection timeout to avoid config flow timeouts ( #29172 )
2019-11-27 14:14:01 -08:00
jjlawren
fc8920646b
Fix Plex test timeouts ( #28077 )
...
* Ensure mocked calls are inside patch
* Avoid filesytem I/O
2019-10-21 16:29:04 -07:00
jjlawren
0888098718
Use URI provided by Plex for local connections ( #27515 )
...
* Use provided URI for local connections
* Use provided plexapi connection method
* Remove unused mock from tests
* Handle potential edge case(s)
2019-10-17 17:31:53 -07:00
jjlawren
cf76f22c89
Rewrite Plex tests ( #27624 )
2019-10-13 21:59:25 -07:00
jjlawren
a3c98440e0
Remove manual config flow step ( #27291 )
2019-10-07 11:29:12 -07:00
jjlawren
571ab5a978
Plex external config flow ( #26936 )
...
* Plex external auth config flow
* Update requirements_all
* Test dependency
* Bad await, delay variable
* Use hass aiohttp session, bump plexauth
* Bump requirements
* Bump library version again
* Use callback view instead of polling
* Update tests for callback view
* Reduce timeout with callback
* Review feedback
* F-string
* Wrap sync call
* Unused
* Revert unnecessary async wrap
2019-10-01 17:20:30 +02:00
jjlawren
9b204ad162
Add Plex config options support ( #26870 )
...
* Add config options support
* Actually copy dict
* Move media_player options to PlexServer class
* Handle updated config options
* Move callback out of server
2019-09-26 11:10:20 +02:00
jjlawren
5914475fe5
Add manual step to Plex config flow ( #26773 )
...
* Add manual config step
* Pass token to manual step
* Fix for no token
* Show error
* Specify key location
* Cast discovery port to int
2019-09-23 00:23:14 +02:00
jjlawren
2d12bac0e2
Add Plex config flow support ( #26548 )
...
* Add config flow support
* Log error on failed connection
* Review comments
* Unused errors
* Move form to step
* Use instance var instead of passing argument
* Only share servers created by component
* Return errors early to avoid try:else
* Separate debug for validation vs setup
* Unnecessary
* Unnecessary checks
* Combine import flows, move logic to component
* Use config entry discovery handler
* Temporary lint fix
* Filter out servers already configured
* Remove manual config flow
* Skip discovery if a config exists
* Swap conditional to reduce indenting
* Only discover when no configs created or creating
* Un-nest function
* Proper async use
* Move legacy file import to discovery
* Fix, bad else
* Separate validate step
* Unused without manual setup step
* Async oops
* First attempt at tests
* Test cleanup
* Full test coverage for config_flow, enable tests
* Lint
* Fix lint vs black
* Add test init
* Add test package requirement
* Actually run script
* Use 'not None' convention
* Group exceptions by result
* Improve logic, add new error and test
* Test cleanup
* Add more asserts
2019-09-19 23:29:26 +02:00