Update Plex via websockets (#28158)
* Save client identifier from auth for future use * Use websocket events to update Plex * Handle websocket disconnections * Use aiohttp, shut down socket cleanly * Bad rebase fix * Don't connect websocket during config_flow validation, fix tests * Move websocket handling to external library * Close websocket session on HA stop * Use external library, revert unnecessary test change * Async & lint fixes * Clean up websocket stopper on entry unload * Setup websocket in component, pass actual needed object to library
This commit is contained in:
1 parent
9153729b21
commit
43c7b57d1e
7 files changed
+52
-13
No files matched your search
@@ -10,8 +10,8 @@ DEFAULT_VERIFY_SSL = True
|
||||
|
||||
DISPATCHERS = "dispatchers"
|
||||
PLATFORMS = ["media_player", "sensor"]
|
||||
REFRESH_LISTENERS = "refresh_listeners"
|
||||
SERVERS = "servers"
|
||||
WEBSOCKETS = "websockets"
|
||||
|
||||
PLEX_CONFIG_FILE = "plex.conf"
|
||||
PLEX_MEDIA_PLAYER_OPTIONS = "plex_mp_options"
|
||||
@@ -19,6 +19,7 @@ PLEX_SERVER_CONFIG = "server_config"
|
||||
|
||||
PLEX_NEW_MP_SIGNAL = "plex_new_mp_signal.{}"
|
||||
PLEX_UPDATE_MEDIA_PLAYER_SIGNAL = "plex_update_mp_signal.{}"
|
||||
PLEX_UPDATE_PLATFORMS_SIGNAL = "plex_update_platforms_signal.{}"
|
||||
PLEX_UPDATE_SENSOR_SIGNAL = "plex_update_sensor_signal.{}"
|
||||
|
||||
CONF_CLIENT_IDENTIFIER = "client_id"
|
||||
|
||||
Reference in new issue
Block a user