Get the preferred device matching a given filter
the deployment entity
a device metadata filter
a device, or NULL