设置舱门状态
This commit is contained in:
parent
fca4eff00d
commit
b5ccef48d0
|
|
@ -352,6 +352,18 @@ public class TuohengBufferDeviceImpl implements IBufferDeviceService {
|
|||
dto.setCabinHumidity(value.getValue());
|
||||
});
|
||||
|
||||
// 设置舱门状态
|
||||
log.info("---------- 解析舱门状态 ----------");
|
||||
telemetry.get(TuohengDeviceTelemetry.NEST_DOOR_STATUS)
|
||||
.ifPresent(value -> {
|
||||
Integer doorStatus = value.getValue();
|
||||
log.info("NEST_DOOR_STATUS 舱门状态原始值: {}", doorStatus);
|
||||
// 0=打开, 1=关闭
|
||||
String cabinDoorStatus = (doorStatus != null && doorStatus == 0) ? "OPEN" : "CLOSED";
|
||||
dto.setCabinDoorStatus(cabinDoorStatus);
|
||||
log.info("设置舱门状态: {}", cabinDoorStatus);
|
||||
});
|
||||
|
||||
// 设置环境数据
|
||||
log.info("---------- 解析气象数据 ----------");
|
||||
telemetry.get(TuohengDeviceTelemetry.NEST_INNER_TEMP)
|
||||
|
|
|
|||
Loading…
Reference in New Issue