core/homeassistant/components/switch/qwikswitch.py

22 lines
603 B
Python
Raw Normal View History

"""
Support for Qwikswitch relays.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/switch.qwikswitch/
"""
import logging
2017-01-17 22:40:34 +00:00
DEPENDENCIES = ['qwikswitch']
# pylint: disable=unused-argument
def setup_platform(hass, config, add_devices, discovery_info=None):
2018-03-25 21:32:13 +00:00
"""Add switches from the main Qwikswitch component."""
if discovery_info is None:
2018-03-25 21:32:13 +00:00
logging.getLogger(__name__).error(
"Configure Qwikswitch Switch component failed")
return False
2018-03-25 21:32:13 +00:00
add_devices(hass.data['qwikswitch']['switch'])
return True