add lock for sensor value