Commit Graph

122 Commits (0f725a24bdd504382baa125e94e72cc862e760c2)

Author SHA1 Message Date
Allen Porter 12129e9d21
Update service call return values and error handling (#94657)
* Update return signature of service calls

* Add timeout error handling in websocket api for service calls

* Update recorder tests to remove assertion on service call

* Remove timeout behavior and update callers that depend on it today

* Fix tests

* Add missing else

* await coro directly

* Fix more tests

* Update the intent task to use wait instead of timeout

* Remove script service call limits and limit constants

* Update tests that depend on service call limits

* Use wait instead of wait_for and add test

* Update homeassistant/helpers/intent.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-06-16 07:01:40 -07:00
Ville Skyttä 940942a74a
Import `util.dt` as `dt_util` in `components/[p-s]*` (#93761) 2023-05-30 00:09:42 +03:00
jjlawren c88d4b09c9
Handle invalidated Plex token (#91438) 2023-04-17 09:38:16 +02:00
epenet 7982f713e1
Fix lingering tasks in plex (#89282)
* Cleanup expected_lingering_tasks in plex

* Adjust
2023-03-08 10:53:08 -05:00
epenet c51bde9a26
Fail CI on lingering tasks (#88905) 2023-03-07 11:35:48 +01:00
epenet 0c65af93af
Split reauth tests in plex (#89212) 2023-03-06 10:02:32 +01:00
epenet ec0223f326
Cleanup plex config flow tests (#88991) 2023-03-05 05:38:26 +01:00
epenet 2cdc741900
Add type hints to integration tests (part 17) (#88163) 2023-02-15 11:14:04 +01:00
epenet 3abf7ea18a
Add type hints to integration tests (m-p) (#87705) 2023-02-08 07:48:54 -08:00
Franck Nijhof a79885ceaf
Enable Ruff SIM117 (#86783) 2023-01-27 11:52:49 +01:00
jjlawren c1213857ce
Fix Plex reauth with multiple available servers (#80508) 2022-10-18 11:51:43 +02:00
epenet 0d696b84b2
Cleanup root component imports in tests (#78893) 2022-09-21 06:57:41 -10:00
epenet 41d2ac3943
Cleanup MediaClass and MediaType in tests (#78817)
Cleanup MediaClass/MediaType in tests
2022-09-20 17:55:13 +02:00
epenet 7bc2712142
Adjust root-import in tests (#78761)
* Adjust root-import in tests

* Adjust diagnostics

* Adjust button

* Adjust select

* Adjust device_tracker

* Adjust camera

* Adjust humidifier

* Adjust media_source

* Adjust update

* Adjust siren

* Adjust number

* Adjust alarm_control_panel

* Adjust notify

* Adjust sensor

* Adjust switch

* Revert anthemav

* Don't adjust demo humidifier
2022-09-19 15:22:23 +02:00
J. Nick Koston eeb9a9f058
Make sure all discovery flows are using the helper (#76641) 2022-08-12 09:25:23 -04:00
J. Nick Koston 4a5679db08
Prevent config entries from being reloaded concurrently (#72636)
* Prevent config entries being reloaded concurrently

- Fixes Config entry has already been setup when
  two places try to reload the config entry at the
  same time.

- This comes up quite a bit:
  https://github.com/home-assistant/core/issues?q=is%3Aissue+sort%3Aupdated-desc+%22Config+entry+has+already+been+setup%22+is%3Aclosed

* Make sure plex creates mocks in the event loop

* drop reload_lock, already inherits
2022-05-28 10:49:55 +02:00
jjlawren 9cd9d06bcc
Avoid network activity during Plex tests (#72499) 2022-05-27 09:46:22 +02:00
Franck Nijhof bfb47eb212
Final clean up of helpers accessed via hass (#72032)
* Final clean up of helpers accessed via hass

* Fix circular dep

* Fix import
2022-05-17 23:42:37 +03:00
Franck Nijhof 69cc6ab5f1
Clean up accessing entity_registry.async_get_registry helper via hass (#72005) 2022-05-17 16:40:45 +02:00
jjlawren 016f67b855
Retry on more Plex connection failures during startup (#69822) 2022-04-10 22:25:19 -07:00
jjlawren 112d232c2e
Autoresume in-progress items from Plex media browser (#68494) 2022-03-29 11:08:26 +02:00
jjlawren 653305b998
Support multiple Plex servers in media browser (#68321) 2022-03-21 15:48:44 -07:00
jjlawren b34da1294c
Improve Plex media search failure feedback (#67493) 2022-03-17 13:57:22 -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
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