Summarizing the finding of this paper, we are proposing a refractometric sensor that modifies a perovskite solar cell. This modification takes the form of a subwavelength metallic grating acting as the front contact of the cell. All the system (light source, sensor, and acquisition electronics) can be packed together within a tiny volume allowing miniaturization. The detection uses the electric signal delivered by the cell. This approach does not require any goniometer or spectrometer, making the device easier to operate. When considering a modified figure of merit, ⁎ FOM , to describe the behavior of the device, the reported values are very competitive with existing technologies.