A composition for sensing an analyte can include a photoluminescent nanostructure complexed to a sensing polymer, where the sensing polymer includes an organic polymer non-covalently bound to the photoluminescent nanostructure and an analyte-binding protein covalently bound to the organic polymer, and where the analyte-binding protein is capable of selectively binding the analyte, and the analyte-binding protein undergoes a substantial conformational change when binding the analyte. Separately, a composition for sensing an analyte, can include a complex, where the complex includes a photoluminescent nanostructure in an aqueous surfactant dispersion and a boronic acid capable of selectively reacting with an analyte. The compositions can be used in devices and methods for sensing an analyte.