public static DeviceProperty from(final SensorFormat sensorFormat, final short propertyId) {
        switch (sensorFormat) {
            case FORMAT_A:
                for (DeviceProperty deviceProperty : values()) {
                    if ((deviceProperty.propertyId & 0x7FF) == propertyId) {
                        return deviceProperty;
                    }
                }
            case FORMAT_B:
                return from(propertyId);
            default:
                return UNKNOWN;
        }
    }
Returns the Device Property for a given property id.

@param propertyId property id
mesh/src/main/java/no/nordicsemi/android/mesh/sensorutils/DeviceProperty.java