2016-05-13 04:39:30 +00:00
|
|
|
"""
|
2016-05-21 14:59:52 +00:00
|
|
|
Support for Qwikswitch relays.
|
2016-05-13 04:39:30 +00:00
|
|
|
|
2016-05-21 14:59:52 +00:00
|
|
|
For more details about this platform, please refer to the documentation at
|
|
|
|
https://home-assistant.io/components/switch.qwikswitch/
|
2016-05-13 04:39:30 +00:00
|
|
|
"""
|
|
|
|
import logging
|
2017-01-17 22:40:34 +00:00
|
|
|
|
2016-05-13 04:39:30 +00:00
|
|
|
import homeassistant.components.qwikswitch as qwikswitch
|
|
|
|
|
2017-01-17 22:40:34 +00:00
|
|
|
_LOGGER = logging.getLogger(__name__)
|
|
|
|
|
2016-05-13 04:39:30 +00:00
|
|
|
DEPENDENCIES = ['qwikswitch']
|
|
|
|
|
|
|
|
|
|
|
|
# pylint: disable=unused-argument
|
|
|
|
def setup_platform(hass, config, add_devices, discovery_info=None):
|
2016-07-24 00:03:29 +00:00
|
|
|
"""Add switched from the main Qwikswitch component."""
|
|
|
|
if discovery_info is None:
|
2017-01-17 22:40:34 +00:00
|
|
|
_LOGGER.error("Configure Qwikswitch component")
|
2016-05-13 04:39:30 +00:00
|
|
|
return False
|
|
|
|
|
2016-07-24 00:03:29 +00:00
|
|
|
add_devices(qwikswitch.QSUSB['switch'])
|
|
|
|
return True
|