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 Support for VeSync Devices - Outlets and Switches #24953

Merged
merged 54 commits into from Jul 23, 2019

Conversation

@webdjoe
Copy link
Contributor

commented Jul 4, 2019

Breaking Change:

Vesync integration is now a complete component, cannot be setup by individual platforms (i.e. switch). In addition to adding the Vesync component through configuration.yaml, it can also be added through the integration menu in the configuration UI.

The Vesync component no longer supports this syntax in configuration.yaml:

switch
  - platform: vesync
    username: EMAIL
    password: PASSWORD

If using It must be set up using vesync as a component:

vesync:
  username: EMAIL
  password: PASSWORD

Description:

Convert VeSync switch platform to a full component. Can be configured through the integration menu in the configuration front-end or through configuration.yaml. Add support for the European 10 Amp smart outlet (ESW10-EU), US 15 Amp rectangular outlet (ESW15-USA), US 10 Amp round outlet (ESW10-USA), two plug outdoor outlet (ESO15-TB) and in wall switch (ESWL01).

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

Example entry for configuration.yaml (if applicable):

vesync:
  username: EMAIL
  password: PASSWORD

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.
  • New or updated dependencies have been added to requirements_all.txt by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.
@frenck

This comment has been minimized.

Copy link
Member

commented Jul 5, 2019

Tests for the config flow is required.

@webdjoe

This comment has been minimized.

Copy link
Contributor Author

commented Jul 6, 2019

Do I just have to test the config flow or the whole integration?

@frenck

This comment has been minimized.

Copy link
Member

commented Jul 7, 2019

Tests for the config flow (if used) is the minimal requirement.

webdjoe added some commits Feb 20, 2019

webdjoe added some commits Jul 17, 2019

homeassistant/components/vesync/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/vesync/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/vesync/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/vesync/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/vesync/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/vesync/common.py Outdated Show resolved Hide resolved
homeassistant/components/vesync/common.py Outdated Show resolved Hide resolved
homeassistant/components/vesync/common.py Outdated Show resolved Hide resolved
homeassistant/components/vesync/switch.py Outdated Show resolved Hide resolved
homeassistant/components/vesync/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/vesync/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/vesync/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/vesync/config_flow.py Outdated Show resolved Hide resolved
homeassistant/components/vesync/const.py Outdated Show resolved Hide resolved
homeassistant/components/vesync/const.py Outdated Show resolved Hide resolved
homeassistant/components/vesync/const.py Outdated Show resolved Hide resolved
.coveragerc Outdated Show resolved Hide resolved
homeassistant/components/vesync/switch.py Outdated Show resolved Hide resolved
homeassistant/components/vesync/switch.py Outdated Show resolved Hide resolved
homeassistant/components/vesync/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/vesync/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/vesync/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/vesync/config_flow.py Outdated Show resolved Hide resolved
homeassistant/components/vesync/switch.py Outdated Show resolved Hide resolved
homeassistant/components/vesync/switch.py Outdated Show resolved Hide resolved
tests/components/vesync/test_config_flow.py Outdated Show resolved Hide resolved
tests/components/vesync/test_config_flow.py Outdated Show resolved Hide resolved

webdjoe added some commits Jul 21, 2019

@MartinHjelmare
Copy link
Member

left a comment

Great!

@MartinHjelmare

This comment has been minimized.

Copy link
Member

commented Jul 21, 2019

Please add to the breaking change paragraph what the user needs to do to cope with the breaking change.

@webdjoe

This comment has been minimized.

Copy link
Contributor Author

commented Jul 21, 2019

Thanks for your patience in guiding me through this, I have a much better grip on the HA architecture!

@MartinHjelmare

This comment has been minimized.

Copy link
Member

commented Jul 21, 2019

Thanks for the feedback!

PR can be merged when build passes.

@MartinHjelmare MartinHjelmare added this to Reviewer approved in Dev Jul 23, 2019

@MartinHjelmare MartinHjelmare merged commit a8ec826 into home-assistant:dev Jul 23, 2019

9 checks passed

CI Build #20190721.76 succeeded
Details
CI (FullCheck Mypy) FullCheck Mypy succeeded
Details
CI (FullCheck Pylint) FullCheck Pylint succeeded
Details
CI (Overview Lint) Overview Lint succeeded
Details
CI (Overview Validate) Overview Validate succeeded
Details
CI (Tests PyTest Python35) Tests PyTest Python35 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

Dev automation moved this from Reviewer approved to Done Jul 23, 2019

@lock lock bot locked and limited conversation to collaborators Jul 24, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
4 participants
You can’t perform that action at this time.