

def setup_platform(hass, config, add_devices_callback, discovery_info=None):
    'Register discovered WeMo binary sensors.'
    import pywemo.discovery as discovery
    if (discovery_info is not None):
        location = discovery_info[2]
        mac = discovery_info[3]
        device = discovery.device_from_description(location, mac)
        if device:
            add_devices_callback([WemoBinarySensor(device)])

dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/components/binary_sensor/wemo.py setup_platform/original