handleSensorMultilevelAirTemperature method

  1. @override
void handleSensorMultilevelAirTemperature(
  1. SensorMultilevelReport report
)
override

Implementation

@override
void handleSensorMultilevelAirTemperature(SensorMultilevelReport report) {
  temperature = report.value;
  // convert fahrenheit to celsius
  if (report.scale == 1) temperature = (temperature! - 32) * 5 / 9;
}