src/unifi_api/api.py
def find_device(self, device_mac):
        '''
            Find site name of device by mac
            -------------------------
            returns site name where device is located or None if
            device is not managed by this controller
            params:
                Name        | required  | description
                -----------------------------------------
                device_mac  |   True   | device mac address

            # This is a costly function, use with caution
        '''
        for s in self.list_sites():
            if device_mac in [models.MacAddress(d['mac']) for d in self.list_devices(site=s['name'])]:
                return models.SiteName(s['name'])

            Find site name of device by mac
            -------------------------
            returns site name where device is located or None if
            device is not managed by this controller
            params:
                Name        | required  | description
                -----------------------------------------
                device_mac  |   True   | device mac address

            # This is a costly function, use with caution
        
Find site name of device by mac
returns site name where device is located or None if
device is not managed by this controller
params:
Name        | required  | description

device_mac  |   True   | device mac address

This is a costly function, use with caution
Find site name of device by mac returns site name where device is located or None if device is not managed by this controller params : Name | required | description device_mac | True | device mac address This is a costly function use with caution
def find_device(self, device_mac):
        for s in self.list_sites():
            if device_mac in [models.MacAddress(d['mac']) for d in self.list_devices(site=s['name'])]:
                return models.SiteName(s['name'])
def find_device ( self , device_mac ) : for s in self . list_sites ( ) : if device_mac in [ models . MacAddress ( d [ 'mac' ] ) for d in self . list_devices ( site = s [ 'name' ] ) ] : return models . SiteName ( s [ 'name' ] )
Find site name of device by mac
returns site name where device is located or None if
device is not managed by this controller
params:
Name        | required  | description
Find site name of device by mac returns site name where device is located or None if device is not managed by this controller params : Name | required | description
'''
            Find site name of device by mac
            -------------------------
            returns site name where device is located or None if
            device is not managed by this controller
            params:
                Name        | required  | description
                -----------------------------------------
                device_mac  |   True   | device mac address

            # This is a costly function, use with caution
        '''
self
device_mac