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.setRoomId(t.getRoomId());
|
||||
newT.setUseExternalSensors(t.isUseExternalSensors());
|
||||
|
||||
if (t.isTurnOn()) {
|
||||
newT.setMode(Thermostat.Mode.IDLE);
|
||||
thermostatService.computeState(newT);
|
||||
} else {
|
||||
newT.setMode(Thermostat.Mode.OFF);
|
||||
}
|
||||
newT.setOn(t.isTurnOn());
|
||||
|
||||
newT = thermostatRepository.save(newT);
|
||||
thermostatService.populateMeasuredTemperature(newT);
|
||||
|
|
Loading…
Reference in a new issue