homebridge-somfy-rfxcom 2.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config.schema.json +2 -3
- package/index.js +8 -3
- package/package.json +1 -1
package/config.schema.json
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"footerDisplay": "For help, see the [README](https://github.com/nroughol-dev/homebridge-somfy-rfxcom#readme).",
|
|
7
7
|
"schema": {
|
|
8
8
|
"type": "object",
|
|
9
|
+
"required": ["name"],
|
|
9
10
|
"properties": {
|
|
10
11
|
"name": {
|
|
11
12
|
"title": "Name",
|
|
12
13
|
"type": "string",
|
|
13
14
|
"default": "Somfy RFXCom",
|
|
14
|
-
"required": true,
|
|
15
15
|
"description": "Display name for the platform."
|
|
16
16
|
},
|
|
17
17
|
"tty": {
|
|
@@ -31,17 +31,16 @@
|
|
|
31
31
|
"type": "array",
|
|
32
32
|
"items": {
|
|
33
33
|
"type": "object",
|
|
34
|
+
"required": ["name", "deviceID"],
|
|
34
35
|
"properties": {
|
|
35
36
|
"name": {
|
|
36
37
|
"title": "Name",
|
|
37
38
|
"type": "string",
|
|
38
|
-
"required": true,
|
|
39
39
|
"description": "Display name of the remote in HomeKit."
|
|
40
40
|
},
|
|
41
41
|
"deviceID": {
|
|
42
42
|
"title": "Device ID",
|
|
43
43
|
"type": "string",
|
|
44
|
-
"required": true,
|
|
45
44
|
"pattern": "^0x[0-9a-fA-F]+/\\d+$",
|
|
46
45
|
"description": "Remote address and unit code (e.g. 0x000001/1). Found in RFXMngr."
|
|
47
46
|
},
|
package/index.js
CHANGED
|
@@ -118,10 +118,11 @@ RFXComPlatform.prototype.addRFYRemoteSwitch = function(remote, device, type) {
|
|
|
118
118
|
if (!accessory) {
|
|
119
119
|
this.log(`Creating new accessory: ${switchID}`)
|
|
120
120
|
const uuid = UUIDGen.generate(switchID)
|
|
121
|
-
accessory = new Accessory(
|
|
121
|
+
accessory = new Accessory(name, uuid)
|
|
122
122
|
isNew = true
|
|
123
123
|
} else {
|
|
124
124
|
this.log(`Restoring cached accessory: ${switchID}`)
|
|
125
|
+
accessory.displayName = name
|
|
125
126
|
}
|
|
126
127
|
|
|
127
128
|
this.accessories[switchID] = accessory
|
|
@@ -136,8 +137,12 @@ RFXComPlatform.prototype.addRFYRemoteSwitch = function(remote, device, type) {
|
|
|
136
137
|
|
|
137
138
|
remote.switches[type] = accessory
|
|
138
139
|
|
|
139
|
-
|
|
140
|
-
|
|
140
|
+
let switchService = accessory.getService(Service.Switch)
|
|
141
|
+
if (!switchService) {
|
|
142
|
+
switchService = accessory.addService(Service.Switch, name)
|
|
143
|
+
} else {
|
|
144
|
+
switchService.displayName = name
|
|
145
|
+
switchService.updateCharacteristic(Characteristic.Name, name)
|
|
141
146
|
}
|
|
142
147
|
|
|
143
148
|
accessory
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-somfy-rfxcom",
|
|
3
3
|
"displayName": "Somfy RFXcom",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.2",
|
|
5
5
|
"description": "Homebridge plugin for controlling Somfy RTS blinds, awnings, and gates via an RFXtrx433(E) transceiver.",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"scripts": {
|