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>
This commit is contained in:
jjlawren
2019-11-23 09:16:21 -06:00
committed by GitHub
parent 614842bcf2
commit 2c00a9ec68
2 changed files with 22 additions and 15 deletions

View File

@@ -9,7 +9,8 @@ DEFAULT_SSL = False
DEFAULT_VERIFY_SSL = True
DISPATCHERS = "dispatchers"
PLATFORMS = ["media_player", "sensor"]
PLATFORMS = frozenset(["media_player", "sensor"])
PLATFORMS_COMPLETED = "platforms_completed"
SERVERS = "servers"
WEBSOCKETS = "websockets"