mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 22:27:07 +00:00
Fixes (#9912)
This commit is contained in:
parent
51c5534c2a
commit
3de95c068a
@ -1,6 +1,5 @@
|
|||||||
"""Implements a RainMachine sprinkler controller for Home Assistant."""
|
"""Implements a RainMachine sprinkler controller for Home Assistant."""
|
||||||
|
|
||||||
import asyncio
|
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
from logging import getLogger
|
from logging import getLogger
|
||||||
|
|
||||||
@ -53,8 +52,7 @@ PLATFORM_SCHEMA = vol.Schema(
|
|||||||
extra=vol.ALLOW_EXTRA)
|
extra=vol.ALLOW_EXTRA)
|
||||||
|
|
||||||
|
|
||||||
@asyncio.coroutine
|
def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||||
def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
|
|
||||||
"""Set this component up under its platform."""
|
"""Set this component up under its platform."""
|
||||||
import regenmaschine as rm
|
import regenmaschine as rm
|
||||||
|
|
||||||
@ -114,7 +112,7 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
|
|||||||
zone_run_time,
|
zone_run_time,
|
||||||
device_name=rainmachine_device_name, ))
|
device_name=rainmachine_device_name, ))
|
||||||
|
|
||||||
async_add_devices(entities)
|
add_devices(entities)
|
||||||
except rm.exceptions.HTTPError as exc_info:
|
except rm.exceptions.HTTPError as exc_info:
|
||||||
_LOGGER.error('An HTTP error occurred while talking with RainMachine')
|
_LOGGER.error('An HTTP error occurred while talking with RainMachine')
|
||||||
_LOGGER.debug(exc_info)
|
_LOGGER.debug(exc_info)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user