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

Add Plex config flow support #26548

Merged
merged 39 commits into from Sep 19, 2019

Conversation

@jjlawren
Copy link
Contributor

commented Sep 10, 2019

Description:

Add support for config flow setup for Plex. Major changes:

  • Uses config flow
  • Allows to configure multiple Plex servers
  • Validates configs during setup
  • Removes legacy configurator setup
  • Imports existing configurations from component and legacy plex.conf file
  • Uses discovery to set defaults for manual setup
  • Allows interactive selection of server if multiple servers associated with an account

A continuation from #26157 and #26488, #26583

Related issue (if applicable): fixes #18113 #22973

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

Example entry for configuration.yaml (if applicable):

Legacy configurations are accepted and imported to a config entry.

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:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly. Update and include derived files by running python3 -m script.hassfest.
@project-bot project-bot bot added this to Needs review in Dev Sep 10, 2019
@jjlawren jjlawren referenced this pull request Sep 10, 2019
6 of 6 tasks complete
Copy link
Member

left a comment

The config flow requires 100 % test coverage. Make sure it's not excluded from test coverage and see eg hue config flow tests for test examples.

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 Outdated Show resolved Hide resolved
homeassistant/components/plex/sensor.py Outdated Show resolved Hide resolved
homeassistant/components/plex/sensor.py Outdated Show resolved Hide resolved
homeassistant/components/plex/strings.json Outdated Show resolved Hide resolved
homeassistant/components/plex/strings.json Outdated Show resolved Hide resolved
Dev automation moved this from Needs review to Review in progress Sep 10, 2019
@jjlawren jjlawren referenced this pull request Sep 11, 2019
5 of 5 tasks complete
jjlawren added 18 commits Sep 10, 2019
@jjlawren jjlawren force-pushed the jjlawren:plex_config_flow_v2 branch from 4faf046 to 220fb07 Sep 11, 2019
jjlawren added 3 commits Sep 12, 2019
Copy link
Member

left a comment

Looks good I think!

tests/components/plex/test_config_flow.py Outdated Show resolved Hide resolved
tests/components/plex/test_config_flow.py Outdated Show resolved Hide resolved
tests/components/plex/test_config_flow.py Outdated Show resolved Hide resolved
tests/components/plex/test_config_flow.py Outdated Show resolved Hide resolved
jjlawren added 12 commits Sep 17, 2019
Copy link
Member

left a comment

Great!

Dev automation moved this from Review in progress to Reviewer approved Sep 18, 2019
Copy link
Member

left a comment

Looks good to me, but mainly focused on the config entries

@jjlawren jjlawren referenced this pull request Sep 18, 2019
2 of 2 tasks complete
@MartinHjelmare MartinHjelmare merged commit 2d12bac into home-assistant:dev Sep 19, 2019
11 checks passed
11 checks passed
CI Build #20190918.63 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 100% of diff hit (target 93.99%)
Details
codecov/project 94.02% (target 90%)
Details
Dev automation moved this from Reviewer approved to Done Sep 19, 2019
@jjlawren jjlawren deleted the jjlawren:plex_config_flow_v2 branch Sep 20, 2019
@jjlawren jjlawren referenced this pull request Sep 20, 2019
4 of 4 tasks complete
KJonline added a commit to KJonline/home-assistant that referenced this pull request Sep 20, 2019
* dev: (167 commits)
  Bump aiowwlln to 2.0.2 (home-assistant#26769)
  ZHA siren and warning device support (home-assistant#26046)
  Add transport data from maps.yandex.ru api (home-assistant#26766)
  Type hint additions (home-assistant#26765)
  Bump openwrt-luci-rpc to version 1.1.1 (home-assistant#26759)
  Revert "Add transport data from maps.yandex.ru api (home-assistant#26252)" (home-assistant#26762)
  [ci skip] Translation update
  Updated frontend to 20190919.0
  deCONZ improve gateway tests (home-assistant#26709)
  Add transport data from maps.yandex.ru api (home-assistant#26252)
  Update codeowners (home-assistant#26733)
  Bump influxdb to 5.2.3 (home-assistant#26743)
  Izone component (home-assistant#24550)
  Bump restrictedpython to 5.0 (home-assistant#26741)
  Bumped version to 0.99.1
  Add Plex config flow support (home-assistant#26548)
  Bump pyobihai to fix issue with user account (home-assistant#26736)
  Bump TRADFRI (home-assistant#26731)
  Encode prometheus metric names per the prom spec (home-assistant#26639)
  Bump aiohttp to 3.6.1 (home-assistant#26739)
  ...
@jjlawren jjlawren referenced this pull request Sep 20, 2019
6 of 6 tasks complete
@lock lock bot locked and limited conversation to collaborators Sep 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Dev
  
Done
5 participants
You can’t perform that action at this time.