Nature Communications, Published online: 21 August 2026; doi:10.1038/s41467-026-76895-5 Photocontrollable luminescent molecular switches are promising for smart materials, though it is challenging to preserve photoresponse in solid matrices. Here the authors design a series of donor-acceptor Stenhouse adducts which undergo fluorescence resonance energy transfer in a shape-memory polymer network.