From 5fc63edf4ff92b13ea462a98b128c698ae516762 Mon Sep 17 00:00:00 2001 From: omenem Date: Mon, 27 Apr 2020 19:04:52 +0200 Subject: [PATCH] fix --- .../smarthut/controller/ThermostatController.java | 1 + .../smarthut/dto/ThermostatSaveRequest.java | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/controller/ThermostatController.java b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/controller/ThermostatController.java index 670df76..6761ee5 100644 --- a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/controller/ThermostatController.java +++ b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/controller/ThermostatController.java @@ -28,6 +28,7 @@ public class ThermostatController { newT.setId(t.getId()); newT.setName(t.getName()); newT.setRoomId(t.getRoomId()); + newT.setMeasuredTemperature(t.getMeasuredTemperature()); newT.setUseExternalSensors(t.isUseExternalSensors()); newT.setOn(t.isTurnOn()); diff --git a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/dto/ThermostatSaveRequest.java b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/dto/ThermostatSaveRequest.java index 5ac3402..3986996 100644 --- a/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/dto/ThermostatSaveRequest.java +++ b/src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/dto/ThermostatSaveRequest.java @@ -22,6 +22,8 @@ public class ThermostatSaveRequest { @NotNull private boolean useExternalSensors; + @NotNull private BigDecimal measuredTemperature; + /** State of this thermostat */ @NotNull private boolean turnOn; @@ -72,4 +74,12 @@ public class ThermostatSaveRequest { public void setId(long id) { this.id = id; } + + public BigDecimal getMeasuredTemperature() { + return measuredTemperature; + } + + public void setMeasuredTemperature(BigDecimal measuredTemperature) { + this.measuredTemperature = measuredTemperature; + } }