Skip to content

Commit

Permalink
Update HueSensor.js
Browse files Browse the repository at this point in the history
Add support for Hue smart button, see #596 and dresden-elektronik/deconz-rest-plugin#2077.
  • Loading branch information
ebaauw committed Jan 8, 2020
1 parent 1c5e6a6 commit 9fa8215
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/HueSensor.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,18 @@ function HueSensor (accessory, id, obj) {
homekitValue: function (v) { return Math.floor(v / 1000) },
homekitAction: hkZLLSwitchAction
}
} else if (
this.obj.manufacturername === 'Philips' &&
this.obj.modelid === 'ROM001'
) {
// Hue smart button
this.createLabel(Characteristic.ServiceLabelNamespace.ARABIC_NUMERALS)
this.createButton(1, 'Button', SINGLE_LONG)
this.type = {
key: 'buttonevent',
homekitValue: function (v) { return Math.floor(v / 1000) },
homekitAction: hkZLLSwitchAction
}
} else if (
this.obj.manufacturername === 'IKEA of Sweden' &&
this.obj.modelid === 'TRADFRI remote control'
Expand Down

0 comments on commit 9fa8215

Please sign in to comment.