Skip to content

Add Plex config flow support#26548

Merged
MartinHjelmare merged 39 commits into
home-assistant:devfrom
jjlawren:plex_config_flow_v2
Sep 19, 2019
Merged

Add Plex config flow support#26548
MartinHjelmare merged 39 commits into
home-assistant:devfrom
jjlawren:plex_config_flow_v2

Conversation

@jjlawren
Copy link
Copy Markdown
Contributor

@jjlawren jjlawren 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.

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.

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.

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 Outdated
Comment thread homeassistant/components/plex/sensor.py Outdated
Comment thread homeassistant/components/plex/sensor.py Outdated
Comment thread homeassistant/components/plex/strings.json Outdated
Comment thread homeassistant/components/plex/strings.json Outdated
Comment thread homeassistant/components/plex/config_flow.py Outdated
Comment thread homeassistant/components/plex/config_flow.py Outdated
Comment thread homeassistant/components/plex/config_flow.py Outdated
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
Comment thread homeassistant/components/plex/config_flow.py Outdated
Comment thread homeassistant/components/plex/config_flow.py Outdated
Comment thread homeassistant/components/plex/config_flow.py Outdated
Comment thread homeassistant/components/plex/config_flow.py
Comment thread homeassistant/components/plex/config_flow.py
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.

Looks good I think!

Comment thread tests/components/plex/test_config_flow.py Outdated
Comment thread tests/components/plex/test_config_flow.py
Comment thread tests/components/plex/test_config_flow.py Outdated
Comment thread tests/components/plex/test_config_flow.py
Comment thread tests/components/plex/test_config_flow.py Outdated
Comment thread tests/components/plex/test_config_flow.py
Comment thread tests/components/plex/test_config_flow.py Outdated
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!

Copy link
Copy Markdown
Member

@Kane610 Kane610 left a comment

Choose a reason for hiding this comment

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

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

@MartinHjelmare MartinHjelmare merged commit 2d12bac into home-assistant:dev Sep 19, 2019
@jjlawren jjlawren deleted the plex_config_flow_v2 branch September 20, 2019 02:28
@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

None yet

Development

Successfully merging this pull request may close these issues.

media_player.plex initializes 2 times

5 participants