def _fix_conf_defaults(config):
    'Update some configuration defaults.'
    config['sid'] = config.pop(CONF_MAC, None)
    if (config.get(CONF_KEY) is None):
        _LOGGER.warning('Key is not provided for gateway %s. Controlling the gateway will not be possible', config['sid'])
    if (config.get(CONF_HOST) is None):
        config.pop(CONF_PORT)
    return config
Update some configuration defaults.
def _fix_conf_defaults(config):
    
    config['sid'] = config.pop(CONF_MAC, None)
    if (config.get(CONF_KEY) is None):
        _LOGGER.warning('Key is not provided for gateway %s. Controlling the gateway will not be possible', config['sid'])
    if (config.get(CONF_HOST) is None):
        config.pop(CONF_PORT)
    return config