Add function to find first device of a given type