Move config and connections to Plex component (#26488)

* Move config and connections to component

* Separate imports

* Set a unique_id on sensor

* Set a platforms const

* Add SERVERS dict, hardcode to single server

* Move to debug

* Return false

* More debug

* Import at top to fix lint

* Guard against legacy setup attempts

* Refactor to add setup callback

* Review comments

* Log levels

* Return result of callback

* Store CONFIGURING in hass.data

* Set up discovery if no config data

* Use schema to set defaults

* Remove media_player options to remove entities

* Improve error handling
This commit is contained in:
jjlawren authored and Martin Hjelmare committed 2019-09-09 23:28:20 +02:00
1 parent 3c629db096
commit 30fb4ddc98
6 files changed
+238 -231

No files matched your search

+4
View File
@@ -7,7 +7,11 @@ DEFAULT_PORT = 32400
DEFAULT_SSL = False
DEFAULT_VERIFY_SSL = True
PLATFORMS = ["media_player", "sensor"]
SERVERS = "servers"
PLEX_CONFIG_FILE = "plex.conf"
PLEX_MEDIA_PLAYER_OPTIONS = "plex_mp_options"
PLEX_SERVER_CONFIG = "server_config"
CONF_USE_EPISODE_ART = "use_episode_art"