Skip to content

Commit

Permalink
fix: remove night mode from alarm and location modes
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Night mode is no longer an option for Ring Alarm and Location Modes.  Any automations that made use of Night mode will need to use Home mode instead.
  • Loading branch information
dgreif committed May 30, 2020
1 parent 3daa1f1 commit 63ff8a0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
8 changes: 8 additions & 0 deletions homebridge/location-mode-switch.ts
Expand Up @@ -137,6 +137,14 @@ export class LocationModeSwitch extends BaseAccessory<Location> {
}
)

targetState.setProps({
validValues: [
Characteristic.SecuritySystemTargetState.AWAY_ARM,
Characteristic.SecuritySystemTargetState.STAY_ARM,
Characteristic.SecuritySystemTargetState.DISARM,
],
})

this.registerObservableCharacteristic({
characteristicType: Characteristic.Manufacturer,
serviceType: AccessoryInformation,
Expand Down
10 changes: 10 additions & 0 deletions homebridge/security-panel.ts
Expand Up @@ -48,6 +48,16 @@ export class SecurityPanel extends BaseDeviceAccessory {
setValue: (value) => this.setTargetState(value),
})

this.getService(Service.SecuritySystem)
.getCharacteristic(Characteristic.SecuritySystemTargetState)
.setProps({
validValues: [
Characteristic.SecuritySystemTargetState.AWAY_ARM,
Characteristic.SecuritySystemTargetState.STAY_ARM,
Characteristic.SecuritySystemTargetState.DISARM,
],
})

if (!config.hideAlarmSirenSwitch) {
this.registerCharacteristic({
characteristicType: Characteristic.On,
Expand Down

0 comments on commit 63ff8a0

Please sign in to comment.