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

Netio Switch platform support #2181

Merged
merged 5 commits into from
Jun 10, 2016
Merged

Netio Switch platform support #2181

merged 5 commits into from
Jun 10, 2016

Conversation

wookiesh
Copy link
Contributor

Added support for Net4all Netio switches.

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

Example entry for configuration.yaml (if applicable):

switch:
  - platform: netio
    host: netio-living
    outlets:
      1: "AppleTV"
      2: "Htpc"
      3: "Lampe Gauche"
      4: "Lampe Droite"
  - platform: netio
    host: 192.168.1.43
    port: 1234
    username: user
    password: pwd
    outlets:
      1: "Nothing..."
      4: "Lampe du fer"

Checklist:

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

If code communicates with devices:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • Tests have been added to verify that the new code works.

Flake8 linting ok.

_LOGGER = logging.getLogger(__name__)

DEPENDENCIES = ['http']
REQUIREMENTS = ['pynetio>=0.1.6']
Copy link
Member

Choose a reason for hiding this comment

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

Please make it a fixed version

@balloob
Copy link
Member

balloob commented Jun 2, 2016

Our dev branch was broken for 24 hours and that's the moment that you branched off :( Please rebase on latest dev so only the tests broken by your commits show up.

@wookiesh wookiesh force-pushed the netio branch 2 times, most recently from 180d207 to 7333591 Compare June 7, 2016 21:11
@balloob
Copy link
Member

balloob commented Jun 9, 2016

Closing and re-opening to trigger tests.

@@ -105,6 +105,9 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):

DEVICES[config[CONF_HOST]] = Device(dev, [])

# Throttle the update for all NetioSwitches of one Netio
dev.update = util.Throttle(MIN_TIME_BETWEEN_SCANS)(dev.update)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Don't understand why I did not simply do this in the first time :)

@wookiesh
Copy link
Contributor Author

wookiesh commented Jun 9, 2016

Unfortunately, the same tests are failing but are not related I think.

@balloob
Copy link
Member

balloob commented Jun 10, 2016

Looks good! 🐬

@balloob balloob merged commit b6d75e6 into home-assistant:dev Jun 10, 2016
@wookiesh
Copy link
Contributor Author

Great!

Thanks :)

On 10 Jun 2016, at 08:40, Paulus Schoutsen [email protected] wrote:

Merged #2181 #2181.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub #2181 (comment), or mute the thread https://github.com/notifications/unsubscribe/AAgpIy_ypaUD_AkD0azL0JbDzNSve8HIks5qKQbagaJpZM4Ip3yf.

@home-assistant home-assistant locked and limited conversation to collaborators Mar 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants