Merge branch '67-fix-in-thermostat-missing-field-in-saverequest' into 'dev'

fix

Closes #67

See merge request sa4-2020/the-sanmarinoes/backend!98
This commit is contained in:
Matteo Omenetti 2020-04-27 19:09:20 +02:00
commit 3118c07a83
2 changed files with 11 additions and 0 deletions

View file

@ -28,6 +28,7 @@ public class ThermostatController {
newT.setId(t.getId()); newT.setId(t.getId());
newT.setName(t.getName()); newT.setName(t.getName());
newT.setRoomId(t.getRoomId()); newT.setRoomId(t.getRoomId());
newT.setMeasuredTemperature(t.getMeasuredTemperature());
newT.setUseExternalSensors(t.isUseExternalSensors()); newT.setUseExternalSensors(t.isUseExternalSensors());
newT.setOn(t.isTurnOn()); newT.setOn(t.isTurnOn());

View file

@ -22,6 +22,8 @@ public class ThermostatSaveRequest {
@NotNull private boolean useExternalSensors; @NotNull private boolean useExternalSensors;
@NotNull private BigDecimal measuredTemperature;
/** State of this thermostat */ /** State of this thermostat */
@NotNull private boolean turnOn; @NotNull private boolean turnOn;
@ -72,4 +74,12 @@ public class ThermostatSaveRequest {
public void setId(long id) { public void setId(long id) {
this.id = id; this.id = id;
} }
public BigDecimal getMeasuredTemperature() {
return measuredTemperature;
}
public void setMeasuredTemperature(BigDecimal measuredTemperature) {
this.measuredTemperature = measuredTemperature;
}
} }