import logging


def setup_platform(hass, config, add_devices, discovery_info=None):
    """Add switches from the main Qwikswitch component."""
    if discovery_info is None:
        logging.getLogger(__name__).error(
            "Configure Qwikswitch Switch component failed")
        return False

    add_devices(hass.data['qwikswitch']['switch'])
    return True