Something like this?
[fh[i] for i in fh if fh[i].attrs['temperature']==20]]
Where fh
is the hdf file handle.
This will return a list with all such datasets. If you only want their names, use:
[i for i in fh if fh[i].attrs['temperature']==20]]