Fix range on temperature sensor and remove magic numbers from device IDs.