Patent ID: 7651663

Claim:
An appliance using water comprising: an incoming water valve; a sensor disposed in-line to an incoming flow of water received from the incoming water valve and configured to sense a degree of hardness in the incoming flow of water, the sensor comprising: a substrate; a sensing element disposed on the substrate, the sensing element comprising a sensing matrix, an indicator for one or more chemical species in a flow of water, and a selectivity component that reacts reversibly with the one or more chemical species; the sensing matrix being in contact with the flow of water during operation; a light source configured to direct light through the substrate and the sensing matrix; and a light detector configured to receive transmitted light from the substrate and the sensing matrix and to generate a signal representative of selective wavelengths of the light indicative of the one or more chemical species in the flow of water; a cleaning volume; a drain for the cleaning volume; an additive valve for an additive used for cleaning; and a controller configured to receive a signal indicative of hardness of the flow of water from the sensor, the controller further configured to output the signal to control the incoming water valve, the additive valve and the drain on the cleaning volume.