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
Merged

Add Support for VeSync Devices - Outlets and Switches #24953

merged 54 commits into from Jul 23, 2019

Conversation

webdjoe
Copy link
Contributor

@webdjoe webdjoe 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
Copy link
Member

frenck commented Jul 5, 2019

Tests for the config flow is required.

@webdjoe
Copy link
Contributor Author

webdjoe commented Jul 6, 2019

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

@frenck
Copy link
Member

frenck commented Jul 7, 2019

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

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 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/switch.py Outdated Show resolved Hide resolved
requirements_all.txt Show resolved Hide resolved
homeassistant/components/vesync/config_flow.py Outdated Show resolved Hide resolved
homeassistant/components/vesync/config_flow.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/__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
Copy link
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!

@MartinHjelmare
Copy link
Member

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

@webdjoe
Copy link
Contributor Author

webdjoe commented Jul 21, 2019

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

@MartinHjelmare
Copy link
Member

MartinHjelmare 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
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
Dev
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants