Central update for Plex platforms (#27764)
* Update Plex platforms together * Remove unnecessary methods * Overhaul of Plex update logic * Apply suggestions from code review Use set instead of list Co-Authored-By: Martin Hjelmare <marhje52@kth.se> * Review suggestions and cleanup * Fixes, remove sensor throttle * Guarantee entity name, use common scheme * Keep name stable once set
This commit is contained in:
parent
5c50fa3405
commit
eeb1bfc6f5
6 changed files with 252 additions and 266 deletions
|
@ -2,12 +2,13 @@
|
|||
from homeassistant.const import __version__
|
||||
|
||||
DOMAIN = "plex"
|
||||
NAME_FORMAT = "Plex {}"
|
||||
NAME_FORMAT = "Plex ({})"
|
||||
|
||||
DEFAULT_PORT = 32400
|
||||
DEFAULT_SSL = False
|
||||
DEFAULT_VERIFY_SSL = True
|
||||
|
||||
DISPATCHERS = "dispatchers"
|
||||
PLATFORMS = ["media_player", "sensor"]
|
||||
REFRESH_LISTENERS = "refresh_listeners"
|
||||
SERVERS = "servers"
|
||||
|
@ -16,6 +17,10 @@ PLEX_CONFIG_FILE = "plex.conf"
|
|||
PLEX_MEDIA_PLAYER_OPTIONS = "plex_mp_options"
|
||||
PLEX_SERVER_CONFIG = "server_config"
|
||||
|
||||
PLEX_NEW_MP_SIGNAL = "plex_new_mp_signal"
|
||||
PLEX_UPDATE_MEDIA_PLAYER_SIGNAL = "plex_update_mp_signal.{}"
|
||||
PLEX_UPDATE_SENSOR_SIGNAL = "plex_update_sensor_signal"
|
||||
|
||||
CONF_SERVER = "server"
|
||||
CONF_SERVER_IDENTIFIER = "server_id"
|
||||
CONF_USE_EPISODE_ART = "use_episode_art"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue