A biosensor molecule comprises: a protease amino acid sequence; at least one sensor comprising at least one sensor amino acid sequence which is responsive to at least one target molecule; and an inhibitor of the protease activity of said protease amino acid sequence; wherein the biosensor is switchable from a protease active to a protease inactive state, or from a protease inactive to a protease active state when said sensor responds to said target molecule. The biosensor protease may be a protease of a virus such as a Potyvirus or a Flavivirus wherein the inhibitor is an autoinhibitory peptide derived from the virus. The biosensor may respond to the target molecule allosterically or may be cleaved by a target protease molecule.