Device for determining at least one state parameter, in particular the concentration and/or the partial pressure, of an analyte in a gaseous medium, comprising - a housing, - at least one light source for emitting light, - at least one light receiver for capturing light, - at least one optical sensor unit and - at least one temperature measurement means for capturing at least indirectly the temperature of the sensor unit, wherein the housing has a dividing wall that separates at least structurally an interior space of the housing from a medium space in which the medium is located, wherein at least the light source, the light receiver and the temperature measurement means are arranged on the side of the interior space inside the housing relative to the dividing wall and at least the sensor unit is arranged on the side of the medium space outside the housing relative to the dividing wall, wherein at least one optical property of the sensor unit depends on the state parameter of the analyte, wherein light rays emanating from the sensor unit, which the sensor unit emits as a result of its irradiation by means of the light source, can be captured by means of the light receiver, wherein, based on data captured in this manner by means of the light receiver, it is possible to infer the state parameter of the analyte in the medium, characterized by at least one thermal insulation layer, which is arranged on a side of the sensor unit that faces away from the housing and which is suitable for insulating the sensor unit at least thermally from the medium, wherein a ratio between the heat transfer coefficient of the thermal insulation layer and the heat transfer coefficient of the dividing wall of the housing is at most 1:1, wherein the thermal insulation layer is configured to be porous with open pores. - a housing, - at least one light source for emitting light, - at least one light receiver for capturing light, - at least one optical sensor unit and - at least one temperature measurement means for capturing at least indirectly the temperature of the sensor unit, wherein the housing has a dividing wall that separates at least structurally an interior space of the housing from a medium space in which the medium is located, wherein at least the light source, the light receiver and the temperature measurement means are arranged on the side of the interior space inside the housing relative to the dividing wall and at least the sensor unit is arranged on the side of the medium space outside the housing relative to the dividing wall, wherein at least one optical property of the sensor unit depends on the state parameter of the analyte, wherein light rays emanating from the sensor unit, which the sensor unit emits as a result of its irradiation by means of the light source, can be captured by means of the light receiver, wherein, based on data captured in this manner by means of the light receiver, it is possible to infer the state parameter of the analyte in the medium, characterized by at least one thermal insulation layer, which is arranged on a side of the sensor unit that faces away from the housing and which is suitable for insulating the sensor unit at least thermally from the medium, wherein a ratio between the heat transfer coefficient of the thermal insulation layer and the heat transfer coefficient of the dividing wall of the housing is at most 1:1, wherein the thermal insulation layer is configured to be porous with open pores.