An analyte monitoring system may include an analyte sensor and a transceiver. The analyte sensor may include: a sensor housing, an analyte indicator on at least a portion of the sensor housing, a protective material on at least a portion of the analyte indicator, and a light source in the sensor housing and configured to emit excitation light to analyte indicator. The transceiver may be configured to receive the sensor measurements conveyed by the analyte sensor, infer information about a condition of the environment surrounding the analyte sensor, and calculate an analyte level using at least one or more of the sensor measurements and the inferred information about the condition of the environment surrounding the sensor. The protective material may have a thickness that is thin enough to allow at least some of the excitation light to pass through the protective material and into the environment surrounding the analyte sensor.