def _populate_calibration_data(self):
        """Populate calibration data.

        From datasheet Bosch BME280 Environmental sensor.
        """
        calibration_t = []
        calibration_p = []
        calibration_h = []
        raw_data = []

        try:
            for i in range(0x88, 0x88 + 24):
                raw_data.append(self._bus.read_byte_data(self._i2c_add, i))
            raw_data.append(self._bus.read_byte_data(self._i2c_add, 0xA1))
            for i in range(0xE1, 0xE1 + 7):
                raw_data.append(self._bus.read_byte_data(self._i2c_add, i))
        except OSError as exc:
            self.log_error("Can't populate calibration data: %s", exc)
            return

        calibration_t.append((raw_data[1] << 8) | raw_data[0])
        calibration_t.append((raw_data[3] << 8) | raw_data[2])
        calibration_t.append((raw_data[5] << 8) | raw_data[4])

        if self._with_pressure:
            calibration_p.append((raw_data[7] << 8) | raw_data[6])
            calibration_p.append((raw_data[9] << 8) | raw_data[8])
            calibration_p.append((raw_data[11] << 8) | raw_data[10])
            calibration_p.append((raw_data[13] << 8) | raw_data[12])
            calibration_p.append((raw_data[15] << 8) | raw_data[14])
            calibration_p.append((raw_data[17] << 8) | raw_data[16])
            calibration_p.append((raw_data[19] << 8) | raw_data[18])
            calibration_p.append((raw_data[21] << 8) | raw_data[20])
            calibration_p.append((raw_data[23] << 8) | raw_data[22])

        if self._with_humidity:
            calibration_h.append(raw_data[24])
            calibration_h.append((raw_data[26] << 8) | raw_data[25])
            calibration_h.append(raw_data[27])
            calibration_h.append((raw_data[28] << 4) | (0x0F & raw_data[29]))
            calibration_h.append(
                (raw_data[30] << 4) | ((raw_data[29] >> 4) & 0x0F))
            calibration_h.append(raw_data[31])

        for i in range(1, 2):
            if calibration_t[i] & 0x8000:
                calibration_t[i] = (-calibration_t[i] ^ 0xFFFF) + 1

        if self._with_pressure:
            for i in range(1, 8):
                if calibration_p[i] & 0x8000:
                    calibration_p[i] = (-calibration_p[i] ^ 0xFFFF) + 1

        if self._with_humidity:
            for i in range(0, 6):
                if calibration_h[i] & 0x8000:
                    calibration_h[i] = (-calibration_h[i] ^ 0xFFFF) + 1

        self._calibration_t = calibration_t
        self._calibration_h = calibration_h
        self._calibration_p = calibration_p