A sensor is a device that detects events or changes in quantities and provides a corresponding output, generally as an electric or optical signal for example a thermocouple converts temperature to an output voltage. But a mercury-in-glass thermometer is also a sensor; it converts the measured temperature into an expansion.