Added update mechanism for updating average sensor values.