'Return the name (if known) of the device.
If a name has been set in Unifi, then return that, else
return the hostname if it has been detected.'

def get_device_name(self, mac):

    client = self._clients.get(mac, {})
    name = (client.get('name') or client.get('hostname'))
    _LOGGER.debug('Device    %s    name    %s', mac, name)
    return name
