An apparatus and method for operating a packer and a fracture valve. The multi-layered nanostructure comprises a cathode, a conducting metal layer, a photo-active layer, a hole-transport layer, and an anode. For example, the sensor may detect when the button is fully pressed, partially pressed, or not pressed at all by the level of magnetic flux density detected by the sensor. The temperature responsive conrol valve shuts off flow through both or one of the inlets depending on coolant temperature.