Skip to content

Commit

Permalink
Fix swapped security system modes (resolves #58).
Browse files Browse the repository at this point in the history
  • Loading branch information
BewhiskeredBard committed Feb 9, 2020
1 parent 587dcea commit e7557c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/serviceFactory/hub/securitySystemServiceFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ export class SecuritySystemServiceFactory extends HubServiceFactory {

if (mode && SecuritySystemServiceFactory.ACTIVE_MODE_STATES.has(mode.state)) {
switch (mode.name) {
case this.homebridge.config.modes.stay:
return this.homebridge.api.hap.Characteristic.SecuritySystemTargetState.AWAY_ARM;
case this.homebridge.config.modes.away:
return this.homebridge.api.hap.Characteristic.SecuritySystemTargetState.AWAY_ARM;
case this.homebridge.config.modes.stay:
return this.homebridge.api.hap.Characteristic.SecuritySystemTargetState.STAY_ARM;
case this.homebridge.config.modes.night:
return this.homebridge.api.hap.Characteristic.SecuritySystemTargetState.NIGHT_ARM;
Expand Down

0 comments on commit e7557c4

Please sign in to comment.