Skip to content

Commit

Permalink
Merge branch 'Loomaanaatii-master'
Browse files Browse the repository at this point in the history
Fix for night arming
  • Loading branch information
chase9 committed Feb 6, 2021
2 parents 9f48059 + f7fd8a0 commit 8db428b
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,26 @@ import {
armAway,
armStay,
closeGarage,
disarm, getCurrentState,
disarm,
getCurrentState,
login,
openGarage,
setLightOff, setLightOn,
setLockSecure, setLockUnsecure,
setLightOff,
setLightOn,
setLockSecure,
setLockUnsecure,
AuthOpts,
GARAGE_STATES,
LIGHT_STATES,
LOCK_STATES,
SENSOR_STATES,
SYSTEM_STATES,
GarageState, LightState, LockState, SensorState,
FlattenedSystemState
GarageState,
LightState,
LockState,
SensorState,
FlattenedSystemState,
armNightStay
} from 'node-alarm-dot-com';

let hap: HAP;
Expand Down Expand Up @@ -98,6 +105,7 @@ class ADCPlatform implements DynamicPlatformPlugin {
silentArming: false
},
'night': {
nightArming: true,
noEntryDelay: false,
silentArming: true
},
Expand Down Expand Up @@ -493,7 +501,7 @@ class ADCPlatform implements DynamicPlatformPlugin {
opts.silentArming = this.armingModes.stay.silentArming;
break;
case Characteristic.SecuritySystemTargetState.NIGHT_ARM:
method = armStay;
method = armNightStay;
opts.noEntryDelay = this.armingModes.night.noEntryDelay;
opts.silentArming = this.armingModes.night.silentArming;
break;
Expand Down

0 comments on commit 8db428b

Please sign in to comment.