Most sensors rely on a change in an electrical parameter to the measurand of interest. Their direct readout via an electrical wire and an electronic circuit is, in principle, technically simple, but it is subject to electromagnetic interference, preventing its application in several industrial environments. Fibre-optic sensors can overcome these limitations because the sensing region and readout region can be spaced apart, sometimes by kilometres. However, fibre-optic sensing typically requires complex interrogation equipment due to the extremely high wavelength accuracy that is required. Here we combine the sensitivity and flexibility of electronic sensors with the advantages of optical readout, by demonstrating a hybrid electronic–photonic sensor integrated on the tip of a fibre. The sensor is based on an electro-optical nanophotonic structure that uses the strong co-localization of static and electromagnetic fields to simultaneously achieve a voltage-to-wavelength transduction and a modulation of reflectance. We demonstrate the possibility of reading the current–voltage characteristics of the electro-optic diode through the fibre and therefore its changes due to the environment. As a proof of concept, we show the application of this method to cryogenic temperature sensing. This approach allows fibre-optic sensing to take advantage of the vast toolbox of electrical sensing modalities for many different measurands.