Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move config and connections to Plex component #26488

Merged
merged 19 commits into from Sep 9, 2019

Conversation

@jjlawren
Copy link
Contributor

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
Member

left a comment

Great!

homeassistant/components/plex/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/plex/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/plex/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/plex/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/plex/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/plex/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/plex/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/plex/sensor.py Show resolved Hide resolved
Dev automation moved this from Needs review to Review in progress Sep 7, 2019
jjlawren added 10 commits Sep 7, 2019
homeassistant/components/plex/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/plex/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/plex/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/plex/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/plex/__init__.py Outdated Show resolved Hide resolved
jjlawren added 6 commits Sep 9, 2019
@jjlawren jjlawren referenced this pull request Sep 9, 2019
2 of 2 tasks complete
@MartinHjelmare MartinHjelmare merged commit 30fb4dd into home-assistant:dev Sep 9, 2019
11 checks passed
11 checks passed
CI Build #20190909.45 succeeded
Details
CI (FullCheck Mypy) FullCheck Mypy succeeded
Details
CI (FullCheck Pylint) FullCheck Pylint succeeded
Details
CI (Overview CheckFormat) Overview CheckFormat succeeded
Details
CI (Overview Lint) Overview Lint succeeded
Details
CI (Overview Validate) Overview Validate succeeded
Details
CI (Tests PyTest Python36) Tests PyTest Python36 succeeded
Details
CI (Tests PyTest Python37) Tests PyTest Python37 succeeded
Details
cla-bot Everyone involved has signed the CLA
codecov/patch Coverage not affected when comparing 5b3004c...f13adf3
Details
codecov/project 94.01% (target 90%)
Details
Dev automation moved this from Review in progress to Done Sep 9, 2019
@jjlawren jjlawren referenced this pull request Sep 10, 2019
6 of 6 tasks complete
@lock lock bot locked and limited conversation to collaborators Sep 10, 2019
@jjlawren jjlawren deleted the jjlawren:plex_common_config branch Sep 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Dev
  
Done
3 participants
You can’t perform that action at this time.