getThermostatDetails static method
Implementation
static Future<Device> getThermostatDetails(Request request, String id) async {
final device = await getDeviceDetails(request, id);
// For now thermostatDeviceTrait is device with only lock trait so stripping
// out all the other traits
final thermostatDeviceTrait =
device.traits.whereType<ThermostatTrait>().toList();
final thermostatDevice = Device(
device.id,
device.displayName,
device.description,
device.manufacturerName,
device.model,
device.serialNumber,
device.createdAt,
device.updatedAt,
thermostatDeviceTrait);
return thermostatDevice;
}