Skip to content

Move config and connections to Plex component#26488

Merged
MartinHjelmare merged 19 commits into
home-assistant:devfrom
jjlawren:plex_common_config
Sep 9, 2019
Merged

Move config and connections to Plex component#26488
MartinHjelmare merged 19 commits into
home-assistant:devfrom
jjlawren:plex_common_config

Conversation

@jjlawren
Copy link
Copy Markdown
Contributor

@jjlawren jjlawren commented Sep 7, 2019

Breaking Change:

Configuration is moved from the media_player and sensor platforms to the plex component. Existing configurations will need to be updated. The remove_unavailable_clients and client_remove_interval options for media_player entities have been removed as the functionality has limited value now that the entity registry exists.

The plex component will now enable both sensor and media_player platforms by default, sharing the same credentials.

Old example:

media_player:
  - platform: plex
    host: 192.168.1.5
    token: mysecrettoken
    use_episode_art: False

sensor:
  - platform: plex
    host: 192.168.1.5
    token: myothersecrettoken

New example:

plex:
  host: 192.168.1.5
  token: mysecrettoken
  media_player:
    use_episode_art: False

Description:

A continuation from #26157 and #26458.

Configuration for the media_player and sensor plex platforms have been merged into a shared configuration. Connection logic has been centralized and both platforms now share the same connection object. The legacy configurator configuration method has been preserved and now works for both platforms instead of just media_player. Discovery has also been modified to load the plex component instead of the Plex media_player component.

Pull request with documentation for home-assistant.io (if applicable):
home-assistant/home-assistant.io#10328

Example entry for configuration.yaml (if applicable):

See Breaking Change above.

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist

If user exposed functionality or configuration variables are added/changed:

Copy link
Copy Markdown
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

Comment thread homeassistant/components/plex/__init__.py
Comment thread homeassistant/components/plex/__init__.py Outdated
Comment thread homeassistant/components/plex/__init__.py
Comment thread homeassistant/components/plex/__init__.py Outdated
Comment thread homeassistant/components/plex/__init__.py Outdated
Comment thread homeassistant/components/plex/__init__.py Outdated
Comment thread homeassistant/components/plex/__init__.py Outdated
Comment thread homeassistant/components/plex/__init__.py Outdated
Comment thread homeassistant/components/plex/__init__.py Outdated
Comment thread homeassistant/components/plex/sensor.py
Comment thread homeassistant/components/plex/media_player.py Outdated
Comment thread homeassistant/components/plex/sensor.py Outdated
Comment thread homeassistant/components/plex/__init__.py Outdated
Comment thread homeassistant/components/plex/__init__.py Outdated
Comment thread homeassistant/components/plex/__init__.py Outdated
Comment thread homeassistant/components/plex/__init__.py
Comment thread homeassistant/components/plex/__init__.py Outdated
Comment thread homeassistant/components/plex/__init__.py Outdated
Comment thread homeassistant/components/plex/__init__.py
@MartinHjelmare MartinHjelmare merged commit 30fb4dd into home-assistant:dev Sep 9, 2019
@jjlawren jjlawren mentioned this pull request Sep 10, 2019
6 tasks
@lock lock Bot locked and limited conversation to collaborators Sep 10, 2019
@jjlawren jjlawren deleted the plex_common_config branch September 14, 2019 22:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants