Fix on thermostat
This commit is contained in:
parent
57a6e22e2a
commit
4aa4d68738
1 changed files with 1 additions and 7 deletions
|
@ -39,13 +39,7 @@ public class ThermostatController {
|
||||||
newT.setName(t.getName());
|
newT.setName(t.getName());
|
||||||
newT.setRoomId(t.getRoomId());
|
newT.setRoomId(t.getRoomId());
|
||||||
newT.setUseExternalSensors(t.isUseExternalSensors());
|
newT.setUseExternalSensors(t.isUseExternalSensors());
|
||||||
|
newT.setOn(t.isTurnOn());
|
||||||
if (t.isTurnOn()) {
|
|
||||||
newT.setMode(Thermostat.Mode.IDLE);
|
|
||||||
thermostatService.computeState(newT);
|
|
||||||
} else {
|
|
||||||
newT.setMode(Thermostat.Mode.OFF);
|
|
||||||
}
|
|
||||||
|
|
||||||
newT = thermostatRepository.save(newT);
|
newT = thermostatRepository.save(newT);
|
||||||
thermostatService.populateMeasuredTemperature(newT);
|
thermostatService.populateMeasuredTemperature(newT);
|
||||||
|
|
Loading…
Reference in a new issue