def setup_platform(hass, config, add_devices, discovery_info=None):
    """Setup the LG WebOS TV platform."""
    if discovery_info is not None:
        host = urlparse(discovery_info[1]).hostname
    else:
        host = config.get(CONF_HOST, None)

        if host is None:
            _LOGGER.error('No host found in configuration')
            return False

    # Only act if we are not already configuring this host
    if _CONFIGURING in host:
        return

    setup_tv(host, hass, add_devices)
dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/components/media_player/webostv.py/setup_platform/swapped operands of `in`