Skip to content

Commit

Permalink
Add service label, label index for programmable switch.
Browse files Browse the repository at this point in the history
  • Loading branch information
KhaosT committed Apr 17, 2017
1 parent 4f7037d commit 5090434
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions lib/gen/HomeKitTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,47 @@ var inherits = require('util').inherits;
var Characteristic = require('../Characteristic').Characteristic;
var Service = require('../Service').Service;

/**
* Characteristic "Label Namespace"
*/

Characteristic.LabelNamespace = function() {
Characteristic.call(this, 'Label Namespace', '000000CD-0000-1000-8000-0026BB765291');
this.setProps({
format: Characteristic.Formats.UINT8,
perms: [Characteristic.Perms.READ, Characteristic.Perms.NOTIFY]
});
this.value = this.getDefaultValue();
};

inherits(Characteristic.LabelNamespace, Characteristic);

Characteristic.LabelNamespace.UUID = '000000CD-0000-1000-8000-0026BB765291';

// The value property of LabelNamespace must be one of the following:
Characteristic.LabelNamespace.DOT = 0;
Characteristic.LabelNamespace.NUMBER = 1;

/**
* Characteristic "Label Index"
*/

Characteristic.LabelIndex = function() {
Characteristic.call(this, 'Label Index', '000000CB-0000-1000-8000-0026BB765291');
this.setProps({
format: Characteristic.Formats.UINT8,
maxValue: 255,
minValue: 1,
minStep: 1,
perms: [Characteristic.Perms.READ, Characteristic.Perms.NOTIFY]
});
this.value = this.getDefaultValue();
};

inherits(Characteristic.LabelIndex, Characteristic);

Characteristic.LabelIndex.UUID = '000000CB-0000-1000-8000-0026BB765291';

/**
* Characteristic "Accessory Flags"
*/
Expand Down Expand Up @@ -2377,6 +2418,21 @@ inherits(Characteristic.WaterLevel, Characteristic);

Characteristic.WaterLevel.UUID = '000000B5-0000-1000-8000-0026BB765291';

/**
* Service "Label"
*/

Service.Label = function(displayName, subtype) {
Service.call(this, displayName, '000000CC-0000-1000-8000-0026BB765291', subtype);

// Required Characteristics
this.addCharacteristic(Characteristic.LabelNamespace);
};

inherits(Service.Label, Service);

Service.Label.UUID = '000000CC-0000-1000-8000-0026BB765291';

/**
* Service "Accessory Information"
*/
Expand Down Expand Up @@ -3108,6 +3164,7 @@ Service.StatelessProgrammableSwitch = function(displayName, subtype) {

// Optional Characteristics
this.addOptionalCharacteristic(Characteristic.Name);
this.addOptionalCharacteristic(Characteristic.LabelIndex);
};

inherits(Service.StatelessProgrammableSwitch, Service);
Expand Down Expand Up @@ -3229,3 +3286,4 @@ inherits(Service.WindowCovering, Service);
Service.WindowCovering.UUID = '0000008C-0000-1000-8000-0026BB765291';

var HomeKitTypesBridge = require('./HomeKitTypes-Bridge');

0 comments on commit 5090434

Please sign in to comment.