matterbridge-example-dynamic-platform 1.1.7 → 1.1.8
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/CHANGELOG.md +12 -0
- package/dist/platform.js +8 -2
- package/npm-shrinkwrap.json +8 -8
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
@@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
|
5
5
|
If you like this project and find it useful, please consider giving it a star on GitHub at https://github.com/Luligu/matterbridge-example-dynamic-platform and sponsoring it.
|
6
6
|
|
7
|
+
## [1.1.8] - 2025-03-05
|
8
|
+
|
9
|
+
### Changed
|
10
|
+
|
11
|
+
- [package]: Require matterbridge 2.2.0.
|
12
|
+
- [package]: Updated package.
|
13
|
+
- [package]: Updated dependencies.
|
14
|
+
|
15
|
+
<a href="https://www.buymeacoffee.com/luligugithub">
|
16
|
+
<img src="./yellow-button.png" alt="Buy me a coffee" width="120">
|
17
|
+
</a>
|
18
|
+
|
7
19
|
## [1.1.7] - 2025-02-11
|
8
20
|
|
9
21
|
### Added
|
package/dist/platform.js
CHANGED
@@ -47,8 +47,8 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
47
47
|
fanModeLookup = ['Off', 'Low', 'Medium', 'High', 'On', 'Auto', 'Smart'];
|
48
48
|
constructor(matterbridge, log, config) {
|
49
49
|
super(matterbridge, log, config);
|
50
|
-
if (this.verifyMatterbridgeVersion === undefined || typeof this.verifyMatterbridgeVersion !== 'function' || !this.verifyMatterbridgeVersion('2.
|
51
|
-
throw new Error(`This plugin requires Matterbridge version >= "2.
|
50
|
+
if (this.verifyMatterbridgeVersion === undefined || typeof this.verifyMatterbridgeVersion !== 'function' || !this.verifyMatterbridgeVersion('2.2.0')) {
|
51
|
+
throw new Error(`This plugin requires Matterbridge version >= "2.2.0". Please update Matterbridge from ${this.matterbridge.matterbridgeVersion} to the latest version in the frontend.`);
|
52
52
|
}
|
53
53
|
this.log.info('Initializing platform:', this.config.name);
|
54
54
|
}
|
@@ -570,21 +570,27 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
570
570
|
this.fan.subscribeAttribute(FanControl.Cluster.id, 'fanMode', async (newValue, oldValue) => {
|
571
571
|
this.fan?.log.info(`Fan mode changed from ${this.fanModeLookup[oldValue]} to ${this.fanModeLookup[newValue]}`);
|
572
572
|
if (newValue === FanControl.FanMode.Off) {
|
573
|
+
await this.fan?.setAttribute(FanControl.Cluster.id, 'percentSetting', 0, this.fan?.log);
|
573
574
|
await this.fan?.setAttribute(FanControl.Cluster.id, 'percentCurrent', 0, this.fan?.log);
|
574
575
|
}
|
575
576
|
else if (newValue === FanControl.FanMode.Low) {
|
577
|
+
await this.fan?.setAttribute(FanControl.Cluster.id, 'percentSetting', 33, this.fan?.log);
|
576
578
|
await this.fan?.setAttribute(FanControl.Cluster.id, 'percentCurrent', 33, this.fan?.log);
|
577
579
|
}
|
578
580
|
else if (newValue === FanControl.FanMode.Medium) {
|
581
|
+
await this.fan?.setAttribute(FanControl.Cluster.id, 'percentSetting', 66, this.fan?.log);
|
579
582
|
await this.fan?.setAttribute(FanControl.Cluster.id, 'percentCurrent', 66, this.fan?.log);
|
580
583
|
}
|
581
584
|
else if (newValue === FanControl.FanMode.High) {
|
585
|
+
await this.fan?.setAttribute(FanControl.Cluster.id, 'percentSetting', 100, this.fan?.log);
|
582
586
|
await this.fan?.setAttribute(FanControl.Cluster.id, 'percentCurrent', 100, this.fan?.log);
|
583
587
|
}
|
584
588
|
else if (newValue === FanControl.FanMode.On) {
|
589
|
+
await this.fan?.setAttribute(FanControl.Cluster.id, 'percentSetting', 100, this.fan?.log);
|
585
590
|
await this.fan?.setAttribute(FanControl.Cluster.id, 'percentCurrent', 100, this.fan?.log);
|
586
591
|
}
|
587
592
|
else if (newValue === FanControl.FanMode.Auto) {
|
593
|
+
await this.fan?.setAttribute(FanControl.Cluster.id, 'percentSetting', 50, this.fan?.log);
|
588
594
|
await this.fan?.setAttribute(FanControl.Cluster.id, 'percentCurrent', 50, this.fan?.log);
|
589
595
|
}
|
590
596
|
}, this.fan.log);
|
package/npm-shrinkwrap.json
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
{
|
2
2
|
"name": "matterbridge-example-dynamic-platform",
|
3
|
-
"version": "1.1.
|
3
|
+
"version": "1.1.8",
|
4
4
|
"lockfileVersion": 3,
|
5
5
|
"requires": true,
|
6
6
|
"packages": {
|
7
7
|
"": {
|
8
8
|
"name": "matterbridge-example-dynamic-platform",
|
9
|
-
"version": "1.1.
|
9
|
+
"version": "1.1.8",
|
10
10
|
"license": "MIT",
|
11
11
|
"dependencies": {
|
12
|
-
"node-ansi-logger": "3.0.
|
12
|
+
"node-ansi-logger": "3.0.1",
|
13
13
|
"node-persist-manager": "1.0.8"
|
14
14
|
},
|
15
15
|
"engines": {
|
16
|
-
"node": ">=18.0.0 <19.0.0 || >=20.0.0 <21.0.0 || >=22.0.0
|
16
|
+
"node": ">=18.0.0 <19.0.0 || >=20.0.0 <21.0.0 || >=22.0.0"
|
17
17
|
},
|
18
18
|
"funding": {
|
19
19
|
"type": "buymeacoffee",
|
@@ -21,12 +21,12 @@
|
|
21
21
|
}
|
22
22
|
},
|
23
23
|
"node_modules/node-ansi-logger": {
|
24
|
-
"version": "3.0.
|
25
|
-
"resolved": "https://registry.npmjs.org/node-ansi-logger/-/node-ansi-logger-3.0.
|
26
|
-
"integrity": "sha512-
|
24
|
+
"version": "3.0.1",
|
25
|
+
"resolved": "https://registry.npmjs.org/node-ansi-logger/-/node-ansi-logger-3.0.1.tgz",
|
26
|
+
"integrity": "sha512-Nx7nkO6Sby8Eti1UFFdff3gImEC35izuvf+aRFh3mrDZ8hgXM/cZdflkpDMnDdxnabYl91LVi4RhB/dm5Yk9iA==",
|
27
27
|
"license": "MIT",
|
28
28
|
"engines": {
|
29
|
-
"node": "18.
|
29
|
+
"node": ">=18.0.0"
|
30
30
|
},
|
31
31
|
"funding": {
|
32
32
|
"type": "buymeacoffee",
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "matterbridge-example-dynamic-platform",
|
3
|
-
"version": "1.1.
|
3
|
+
"version": "1.1.8",
|
4
4
|
"description": "Matterbridge dynamic plugin",
|
5
5
|
"author": "https://github.com/Luligu",
|
6
6
|
"license": "MIT",
|
@@ -26,10 +26,10 @@
|
|
26
26
|
"plugin"
|
27
27
|
],
|
28
28
|
"engines": {
|
29
|
-
"node": ">=18.0.0 <19.0.0 || >=20.0.0 <21.0.0 || >=22.0.0
|
29
|
+
"node": ">=18.0.0 <19.0.0 || >=20.0.0 <21.0.0 || >=22.0.0"
|
30
30
|
},
|
31
31
|
"dependencies": {
|
32
|
-
"node-ansi-logger": "3.0.
|
32
|
+
"node-ansi-logger": "3.0.1",
|
33
33
|
"node-persist-manager": "1.0.8"
|
34
34
|
}
|
35
35
|
}
|