Added last valve open time
This commit is contained in:
@@ -21,6 +21,15 @@ function setOutValveTo(controller_id, nextState) {
|
||||
'set_by': 'server'
|
||||
}
|
||||
});
|
||||
|
||||
if(nextState === "open") {
|
||||
ControllerState.update(state._id, {
|
||||
'$set': {
|
||||
'significantEvents.lastOutValveOpen': new Date(),
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function openOutValve(controller_id) {
|
||||
|
||||
Reference in New Issue
Block a user