    def _refresh_areas_by_min_distance(self):
        """Set area for ALL devices based on closest beacon."""
        for device in self.devices.values():
            if (
                device.is_scanner is not True  # exclude scanners.
                or device.create_sensor  # include any devices we are tracking
                or device.metadevice_type in METADEVICE_SOURCETYPES  # and any source devices for PBLE, ibeacon etc
            ):
                self._refresh_area_by_min_distance(device)
Set area for ALL devices based on closest beacon.
custom_components/bermuda/coordinator.py