Clean up some really odd spacing and add SN

This commit is contained in:
Stephen Yeargin
2015-06-27 01:00:59 -05:00
parent 1e95decbf2
commit 54100c2471
+22 -6
View File
@@ -159,9 +159,11 @@ PhilipsHueAccessory.prototype = {
// Get Services // Get Services
getServices: function() { getServices: function() {
var that = this; var that = this;
return [{ return [
{
sType: types.ACCESSORY_INFORMATION_STYPE, sType: types.ACCESSORY_INFORMATION_STYPE,
characteristics: [{ characteristics: [
{
cType: types.NAME_CTYPE, cType: types.NAME_CTYPE,
onUpdate: null, onUpdate: null,
perms: ["pr"], perms: ["pr"],
@@ -191,6 +193,16 @@ PhilipsHueAccessory.prototype = {
supportBonjour: false, supportBonjour: false,
manfDescription: "Model", manfDescription: "Model",
designedMaxLength: 255 designedMaxLength: 255
},{
cType: types.SERIAL_NUMBER_CTYPE,
onUpdate: null,
perms: ["pr"],
format: "string",
initialValue: this.model + this.id,
supportEvents: false,
supportBonjour: false,
manfDescription: "SN",
designedMaxLength: 255
},{ },{
cType: types.IDENTIFY_CTYPE, cType: types.IDENTIFY_CTYPE,
onUpdate: function(value) { console.log("Change:",value); execute(this.device, this.id, "identify", value); }, onUpdate: function(value) { console.log("Change:",value); execute(this.device, this.id, "identify", value); },
@@ -201,10 +213,12 @@ PhilipsHueAccessory.prototype = {
supportBonjour: false, supportBonjour: false,
manfDescription: "Identify Accessory", manfDescription: "Identify Accessory",
designedMaxLength: 1 designedMaxLength: 1
}] }
]
},{ },{
sType: types.LIGHTBULB_STYPE, sType: types.LIGHTBULB_STYPE,
characteristics: [{ characteristics: [
{
cType: types.NAME_CTYPE, cType: types.NAME_CTYPE,
onUpdate: null, onUpdate: null,
perms: ["pr"], perms: ["pr"],
@@ -263,8 +277,10 @@ PhilipsHueAccessory.prototype = {
designedMaxValue: 100, designedMaxValue: 100,
designedMinStep: 1, designedMinStep: 1,
unit: "%" unit: "%"
}] }
}]; ]
}
];
} }
}; };