matterbridge-example-dynamic-platform 1.2.4-dev-20250612-926c70e → 1.2.4-dev-20250613-639b0ce
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 +1 -1
- package/dist/platform.js +5 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -19,7 +19,7 @@ If you like this project and find it useful, please consider giving it a star on
|
|
19
19
|
- [package]: Require matterbridge 3.0.6.
|
20
20
|
- [package]: Updated package.
|
21
21
|
- [package]: Updated dependencies.
|
22
|
-
- [subscribe]: Prevent attribute setting when offline for air purifier and fan.
|
22
|
+
- [subscribe]: Prevent attribute setting when context is offline for air purifier and fan.
|
23
23
|
|
24
24
|
<a href="https://www.buymeacoffee.com/luligugithub">
|
25
25
|
<img src="bmc-button.svg" alt="Buy me a coffee" width="80">
|
package/dist/platform.js
CHANGED
@@ -676,18 +676,23 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
676
676
|
if (context.offline === true)
|
677
677
|
return;
|
678
678
|
if (newValue === FanControl.FanMode.Off) {
|
679
|
+
this.airPurifier?.setAttribute(FanControl.Cluster.id, 'percentSettings', 0, this.airPurifier?.log);
|
679
680
|
this.airPurifier?.setAttribute(FanControl.Cluster.id, 'percentCurrent', 0, this.airPurifier?.log);
|
680
681
|
}
|
681
682
|
else if (newValue === FanControl.FanMode.Low) {
|
683
|
+
this.airPurifier?.setAttribute(FanControl.Cluster.id, 'percentSettings', 33, this.airPurifier?.log);
|
682
684
|
this.airPurifier?.setAttribute(FanControl.Cluster.id, 'percentCurrent', 33, this.airPurifier?.log);
|
683
685
|
}
|
684
686
|
else if (newValue === FanControl.FanMode.Medium) {
|
687
|
+
this.airPurifier?.setAttribute(FanControl.Cluster.id, 'percentSettings', 66, this.airPurifier?.log);
|
685
688
|
this.airPurifier?.setAttribute(FanControl.Cluster.id, 'percentCurrent', 66, this.airPurifier?.log);
|
686
689
|
}
|
687
690
|
else if (newValue === FanControl.FanMode.High) {
|
691
|
+
this.airPurifier?.setAttribute(FanControl.Cluster.id, 'percentSettings', 100, this.airPurifier?.log);
|
688
692
|
this.airPurifier?.setAttribute(FanControl.Cluster.id, 'percentCurrent', 100, this.airPurifier?.log);
|
689
693
|
}
|
690
694
|
else if (newValue === FanControl.FanMode.On) {
|
695
|
+
this.airPurifier?.setAttribute(FanControl.Cluster.id, 'percentSettings', 100, this.airPurifier?.log);
|
691
696
|
this.airPurifier?.setAttribute(FanControl.Cluster.id, 'percentCurrent', 100, this.airPurifier?.log);
|
692
697
|
}
|
693
698
|
}, this.airPurifier.log);
|
package/npm-shrinkwrap.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "matterbridge-example-dynamic-platform",
|
3
|
-
"version": "1.2.4-dev-
|
3
|
+
"version": "1.2.4-dev-20250613-639b0ce",
|
4
4
|
"lockfileVersion": 3,
|
5
5
|
"requires": true,
|
6
6
|
"packages": {
|
7
7
|
"": {
|
8
8
|
"name": "matterbridge-example-dynamic-platform",
|
9
|
-
"version": "1.2.4-dev-
|
9
|
+
"version": "1.2.4-dev-20250613-639b0ce",
|
10
10
|
"license": "MIT",
|
11
11
|
"dependencies": {
|
12
12
|
"node-ansi-logger": "3.0.1",
|
package/package.json
CHANGED