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 upload and download sensors and component for asuswrt #17757

Merged
merged 12 commits into from Nov 7, 2018

Conversation

@kennedyshead
Contributor

kennedyshead commented Oct 24, 2018

Description:

This will add sensors for upload and download, it will also make asuswrt a component rather than device_tracker.

It's a breaking change for the device_tracker.

Breaking Change
The asuswrt device_tracker platform is now set up as a component.

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

Example entry for configuration.yaml (if applicable):

asuswrt:
    host: 192.168.1.1
    username: !secret asuswrt_username
    password: !secret asuswrt_password

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

If user exposed functionality or configuration variables are added/changed:

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

  • New files were added to .coveragerc.

If the code does not interact with devices:

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

@wafflebot wafflebot bot added the in progress label Oct 24, 2018

@kennedyshead kennedyshead changed the title from Adds upload and download sensors for asuswrt and makes it a component. to Ads upload and download sensors for asuswrt and makes it a component. Oct 24, 2018

@kennedyshead kennedyshead force-pushed the kennedyshead:asuswrt_platform branch from 6118421 to 0e63435 Oct 24, 2018

@kennedyshead kennedyshead force-pushed the kennedyshead:asuswrt_platform branch 2 times, most recently from 1a648db to 62a7609 Oct 25, 2018

@frenck

This comment has been minimized.

Member

frenck commented Oct 25, 2018

Could not find a related PR on our documentation repository, therefore adding the docs-missing label.

@frenck frenck added the docs-missing label Oct 25, 2018

@kennedyshead

This comment has been minimized.

Contributor

kennedyshead commented Oct 26, 2018

Thank you for input @fabaff I will split this one up so that it's easier to review.

@kennedyshead kennedyshead force-pushed the kennedyshead:asuswrt_platform branch 2 times, most recently from 97e3ae4 to dfde1eb Oct 26, 2018

@MartinHjelmare

Please change the tests to mock the integration api, not the entity class. This should in the end allow us to reenable the tests that was doing I/O.

Show resolved Hide resolved homeassistant/components/asuswrt.py Outdated
Show resolved Hide resolved homeassistant/components/asuswrt.py Outdated
Show resolved Hide resolved homeassistant/components/asuswrt.py Outdated
Show resolved Hide resolved homeassistant/components/asuswrt.py
Show resolved Hide resolved homeassistant/components/sensor/asuswrt.py Outdated
Show resolved Hide resolved homeassistant/components/sensor/asuswrt.py Outdated
Show resolved Hide resolved homeassistant/components/sensor/asuswrt.py Outdated
Show resolved Hide resolved homeassistant/components/sensor/asuswrt.py Outdated
Show resolved Hide resolved homeassistant/components/sensor/asuswrt.py Outdated
Show resolved Hide resolved homeassistant/components/sensor/asuswrt.py Outdated
@MartinHjelmare

This comment has been minimized.

Member

MartinHjelmare commented Oct 31, 2018

There are merge conflicts.

@MartinHjelmare MartinHjelmare changed the title from Ads upload and download sensors for asuswrt and makes it a component. to Add upload and download sensors for asuswrt and makes it a component Oct 31, 2018

@MartinHjelmare MartinHjelmare changed the title from Add upload and download sensors for asuswrt and makes it a component to Add upload and download sensors and component for asuswrt Oct 31, 2018

@kennedyshead

This comment has been minimized.

Contributor

kennedyshead commented Nov 1, 2018

Thank you for feedback @MartinHjelmare I will look into this soon ;)

@kennedyshead kennedyshead force-pushed the kennedyshead:asuswrt_platform branch from dfde1eb to e0d6696 Nov 1, 2018

@kennedyshead kennedyshead force-pushed the kennedyshead:asuswrt_platform branch from b473ba0 to 8929a1a Nov 1, 2018

@kennedyshead kennedyshead referenced this pull request Nov 1, 2018

Merged

Add Asuswrt component and sensor #7324

2 of 2 tasks complete

@kennedyshead kennedyshead force-pushed the kennedyshead:asuswrt_platform branch from bb88e9c to c41e36a Nov 7, 2018

@kennedyshead kennedyshead force-pushed the kennedyshead:asuswrt_platform branch from 67b3dc0 to fb9d0ef Nov 7, 2018

@kennedyshead kennedyshead force-pushed the kennedyshead:asuswrt_platform branch from ee03c3a to 6f03c98 Nov 7, 2018

@kennedyshead kennedyshead force-pushed the kennedyshead:asuswrt_platform branch from 6f03c98 to 78e32dd Nov 7, 2018

@MartinHjelmare

This comment has been minimized.

Member

MartinHjelmare commented Nov 7, 2018

Why is github showing the test module as a new file with only additions. Where did the old code go?

@MartinHjelmare

This comment has been minimized.

Member

MartinHjelmare commented Nov 7, 2018

Ok, #18291 removed them.

@kennedyshead

This comment has been minimized.

Contributor

kennedyshead commented Nov 7, 2018

Well they're back :D Ill start moving other tests over as soon as I get the hang of how to do them ;)

@kennedyshead

This comment has been minimized.

Contributor

kennedyshead commented Nov 7, 2018

It would be neat to just have all standard stuff in a single test like climate.turn_off climate.turn_on and so forth, then the integration tests would only have to be for really custom code

@MartinHjelmare

Looks good!

@kennedyshead

This comment has been minimized.

Contributor

kennedyshead commented Nov 7, 2018

<3

@MartinHjelmare MartinHjelmare merged commit aa4da47 into home-assistant:dev Nov 7, 2018

5 checks passed

Hound No violations found. Woof!
WIP Legacy commit status override — see details
Details
cla-bot Everyone involved has signed the CLA
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.03%) to 93.029%
Details

@wafflebot wafflebot bot removed the in progress label Nov 7, 2018

@MartinHjelmare

This comment has been minimized.

Member

MartinHjelmare commented Nov 7, 2018

@kennedyshead please review the paragraph I added in the description about the breaking change, and update that if needed. We will copy that to the release notes of 0.83.

@kennedyshead

This comment has been minimized.

Contributor

kennedyshead commented Nov 7, 2018

IMO that is correct! @MartinHjelmare

@kennedyshead kennedyshead deleted the kennedyshead:asuswrt_platform branch Nov 8, 2018

zxdavb added a commit to zxdavb/home-assistant that referenced this pull request Nov 13, 2018

Add upload and download sensors and component for asuswrt (home-assis…
…tant#17757)

* Adds upload and download sensors for asuswrt and makes it a component.

* Rebase

* removes warnings

* Fixing review issues

* More robust connection phase

* Generate dependencies

* Not needed try catch

* Rename sensors

* Revorked tests so they can be turned on again

* Using component setup

* Test through correct setup

* Forgot we dont need to worry about older py

@balloob balloob referenced this pull request Nov 29, 2018

Merged

0.83 #18776

@MartinHjelmare

This comment has been minimized.

Member

MartinHjelmare commented Dec 1, 2018

Please open an issue if you suspect a bug. If you need help please use our help channels:
https://home-assistant.io/help/#communication-channels

Merged PRs should not be used for support or bug reports. Thanks!

@home-assistant home-assistant locked as resolved and limited conversation to collaborators Dec 1, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.