use more general class sensor instead of temperature