'Check for connected devices.'

def _update_info(self):

    _LOGGER.info('Checking    Linksys    Smart    Wifi')
    self.last_results = {}
    response = self._make_request()
    if (response.status_code != 200):
        _LOGGER.error('Got    HTTP    status    code    %d    when    getting    device    list', response.status_code)
        return False
    try:
        data = response.json()
        result = data['responses'][0]
        devices = result['output']['devices']
        for device in devices:
            macs = device['knownMACAddresses']
            if (not macs):
                _LOGGER.warning('Skipping    device    without    known    MAC    address')
                continue
            mac = macs[(-1)]
            connections = device['connections']
            if (not connections):
                _LOGGER.debug('Device    %s    is    not    connected', mac)
                continue
            name = None
            for prop in device['properties']:
                if (prop['name'] == 'userDeviceName'):
                    name = prop['value']
            if (not name):
                name = device.get('friendlyName', device['deviceID'])
            _LOGGER.debug('Device    %s    is    connected', mac)
            self.last_results[mac] = name
    except (KeyError, IndexError):
        _LOGGER.exception('Router    returned    unexpected    response')
        return False
    return True
