homebridge-zencontrol-tpi 1.1.0-next.0 → 1.1.0-next.1
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/README.md +23 -3
- package/dist/platform.js +21 -6
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -4,6 +4,17 @@ A plugin for Homebridge that enables control over lights using Zencontrol Third
|
|
|
4
4
|
|
|
5
5
|
## Testing
|
|
6
6
|
|
|
7
|
+
## Contributing
|
|
8
|
+
|
|
9
|
+
This project uses `npm` and [`changesets`](https://github.com/changesets/changesets) for its build process.
|
|
10
|
+
|
|
11
|
+
When committing a change, please create a changeset:
|
|
12
|
+
|
|
13
|
+
```shell
|
|
14
|
+
npm exec changeset
|
|
15
|
+
git commit -a "feat: ..."
|
|
16
|
+
```
|
|
17
|
+
|
|
7
18
|
## Releasing
|
|
8
19
|
|
|
9
20
|
### Pre-release
|
|
@@ -11,7 +22,7 @@ A plugin for Homebridge that enables control over lights using Zencontrol Third
|
|
|
11
22
|
To enter pre-release mode:
|
|
12
23
|
|
|
13
24
|
```shell
|
|
14
|
-
|
|
25
|
+
npm exec changeset pre enter next
|
|
15
26
|
git add .changeset/pre.json
|
|
16
27
|
git commit -m "publish: enter prerelease"
|
|
17
28
|
```
|
|
@@ -19,7 +30,16 @@ git commit -m "publish: enter prerelease"
|
|
|
19
30
|
Once you've made changes and committed one or more changesets; bump the version:
|
|
20
31
|
|
|
21
32
|
```shell
|
|
22
|
-
|
|
33
|
+
npm run release:version
|
|
23
34
|
git commit -a -m "publish: prerelease"
|
|
24
|
-
|
|
35
|
+
npm run release
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
To exit pre-release mode:
|
|
39
|
+
|
|
40
|
+
```shell
|
|
41
|
+
npm exec changeset pre exit
|
|
42
|
+
npm run release:version
|
|
43
|
+
git commit -a -m "publish: release"
|
|
44
|
+
npm run release
|
|
25
45
|
```
|
package/dist/platform.js
CHANGED
|
@@ -140,7 +140,7 @@ export class ZencontrolTPIPlatform {
|
|
|
140
140
|
}));
|
|
141
141
|
for (let variable = 0; variable < ZenConst.MAX_SYSVAR; variable++) {
|
|
142
142
|
promises.push(this.zc.querySystemVariableName(controller, variable).then(async (label) => {
|
|
143
|
-
if (label && label.toLocaleLowerCase().
|
|
143
|
+
if (label && label.toLocaleLowerCase().endsWith(' temperature')) {
|
|
144
144
|
let value = await this.zc.querySystemVariable(controller, variable);
|
|
145
145
|
/* This API doesn't respect magnitude so we have to guess */
|
|
146
146
|
if (value !== null) {
|
|
@@ -148,17 +148,32 @@ export class ZencontrolTPIPlatform {
|
|
|
148
148
|
value /= 10;
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
-
const acc = this.addTemperatureAccessory({
|
|
151
|
+
const acc = this.addTemperatureAccessory({
|
|
152
|
+
address: systemVariableToAddressString(controller, variable),
|
|
153
|
+
label: label.substring(0, label.length - ' temperature'.length),
|
|
154
|
+
model: 'System Variable',
|
|
155
|
+
serial: `SV ${controller.id}.${variable}`,
|
|
156
|
+
});
|
|
152
157
|
acc.receiveTemperature(value);
|
|
153
158
|
}
|
|
154
|
-
else if (label && label.toLocaleLowerCase().
|
|
159
|
+
else if (label && label.toLocaleLowerCase().endsWith(' humidity')) {
|
|
155
160
|
const value = await this.zc.querySystemVariable(controller, variable);
|
|
156
|
-
const acc = this.addHumidityAccessory({
|
|
161
|
+
const acc = this.addHumidityAccessory({
|
|
162
|
+
address: systemVariableToAddressString(controller, variable),
|
|
163
|
+
label: label.substring(0, label.length - ' humidity'.length),
|
|
164
|
+
model: 'System Variable',
|
|
165
|
+
serial: `SV ${controller.id}.${variable}`,
|
|
166
|
+
});
|
|
157
167
|
acc.receiveHumidity(value);
|
|
158
168
|
}
|
|
159
|
-
else if (label && label.toLocaleLowerCase().
|
|
169
|
+
else if (label && label.toLocaleLowerCase().endsWith(' lux')) {
|
|
160
170
|
const value = await this.zc.querySystemVariable(controller, variable);
|
|
161
|
-
const acc = this.addLuxAccessory({
|
|
171
|
+
const acc = this.addLuxAccessory({
|
|
172
|
+
address: systemVariableToAddressString(controller, variable),
|
|
173
|
+
label: label.substring(0, label.length - ' lux'.length),
|
|
174
|
+
model: 'System Variable',
|
|
175
|
+
serial: `SV ${controller.id}.${variable}`,
|
|
176
|
+
});
|
|
162
177
|
acc.receiveLux(value);
|
|
163
178
|
}
|
|
164
179
|
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-zencontrol-tpi",
|
|
3
|
-
"version": "1.1.0-next.
|
|
3
|
+
"version": "1.1.0-next.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -24,16 +24,16 @@
|
|
|
24
24
|
"author": "Karl von Randow",
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@changesets/cli": "^2.29.
|
|
28
|
-
"@eslint/js": "^9.
|
|
29
|
-
"@types/node": "^
|
|
30
|
-
"eslint": "^9.
|
|
31
|
-
"homebridge": "^1.11.
|
|
32
|
-
"typescript": "^5.9.
|
|
33
|
-
"typescript-eslint": "^8.
|
|
27
|
+
"@changesets/cli": "^2.29.8",
|
|
28
|
+
"@eslint/js": "^9.39.2",
|
|
29
|
+
"@types/node": "^25.0.3",
|
|
30
|
+
"eslint": "^9.39.2",
|
|
31
|
+
"homebridge": "^1.11.1",
|
|
32
|
+
"typescript": "^5.9.3",
|
|
33
|
+
"typescript-eslint": "^8.51.0"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"homebridge-lib": "^7.
|
|
36
|
+
"homebridge-lib": "^7.2.0",
|
|
37
37
|
"zencontrol-tpi-node": "^1.0.0"
|
|
38
38
|
},
|
|
39
39
|
"publishConfig": {
|