Skip to content

Commit

Permalink
feat(homebridge): hideLightGroups option
Browse files Browse the repository at this point in the history
Closes #27
  • Loading branch information
dgreif committed May 25, 2019
1 parent b3f70fb commit dc3135a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
9 changes: 8 additions & 1 deletion homebridge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ This [Homebridge](https://github.com/nfarina/homebridge) plugin provides a platf
"password": "abc123!#",
"locationIds": ["488e4800-fcde-4493-969b-d1a06f683102", "4bbed7a7-06df-4f18-b3af-291c89854d60"], // OPTIONAL. See below for details
"alarmOnEntryDelay": false, // Optional. See below for details
"beamDurationSeconds": 60 // Optional. See below for details
"beamDurationSeconds": 60, // Optional. See below for details
"hideLightGroups": true // Optional. See below for details
}
]
}
Expand All @@ -45,6 +46,12 @@ set this option to a specific number of seconds.
If this option is not set, the lights will use the duration from the previous time the light was turned on in the Ring app.
The maximum value is `32767`, which is ~9.1 hours.

`hideLightGroups`: Ring smart lighting allows you to create lighting groups within the Ring app.
These groups are convenient for detecting motion in an area of your yard and turning on/off all lights
in the group. However, you may wish to group the lights differently in HomeKit and ignore the
groups you have configured in Ring. If this option is `true`, your Ring groups (and their associated motion sensor)
will be ignored and will not show up in HomeKit.

### Supported Devices
* Security Panel
* This is a software device that represents the alarm for a Ring location
Expand Down
1 change: 1 addition & 0 deletions homebridge/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ import { RingAlarmOptions } from '../api'
export interface RingAlarmPlatformConfig extends RingAlarmOptions {
alarmOnEntryDelay?: boolean
beamDurationSeconds?: number
hideLightGroups?: boolean
}
8 changes: 6 additions & 2 deletions homebridge/ring-alarm-platform.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RingDevice, RingDeviceType, getLocations } from '../api'
import { getLocations, RingDevice, RingDeviceType } from '../api'
import { HAP, hap } from './hap'
import { SecurityPanel } from './security-panel'
import { BaseStation } from './base-station'
Expand Down Expand Up @@ -91,7 +91,11 @@ export class RingAlarmPlatform {
devices.forEach(device => {
const AccessoryClass = getAccessoryClass(device)

if (!AccessoryClass) {
if (
!AccessoryClass ||
(this.config.hideLightGroups &&
device.data.deviceType === RingDeviceType.BeamsLightGroupSwitch)
) {
return
}

Expand Down

0 comments on commit dc3135a

Please sign in to comment.