8000 Corrects mistaken async items in RainMachine by bachya · Pull Request #9912 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Corrects mistaken async items in RainMachine #9912

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

Merged
merged 1 commit into from
Oct 17, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions homeassistant/components/switch/rainmachine.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Implements a RainMachine sprinkler controller for Home Assistant."""

import asyncio
from datetime import timedelta
from logging import getLogger

Expand Down Expand Up @@ -53,8 +52,7 @@
extra=vol.ALLOW_EXTRA)


@asyncio.coroutine
def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Set this component up under its platform."""
import regenmaschine as rm

Expand Down Expand Up @@ -114,7 +112,7 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
zone_run_time,
device_name=rainmachine_device_name, ))

async_add_devices(entities)
add_devices(entities)
except rm.exceptions.HTTPError as exc_info:
_LOGGER.error('An HTTP error occurred while talking with RainMachine')
_LOGGER.debug(exc_info)
Expand Down
0