matterbridge-example-dynamic-platform 1.2.4-dev-20250612-926c70e → 1.2.4-dev-20250613-1c75286
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 +2 -2
- package/dist/platform.js +7 -2
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -8,7 +8,7 @@ If you like this project and find it useful, please consider giving it a star on
|
|
8
8
|
<img src="bmc-button.svg" alt="Buy me a coffee" width="120">
|
9
9
|
</a>
|
10
10
|
|
11
|
-
## [1.2.4] - 2025-06-
|
11
|
+
## [1.2.4] - 2025-06-13
|
12
12
|
|
13
13
|
### Added
|
14
14
|
|
@@ -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);
|
@@ -780,8 +785,8 @@ export class ExampleMatterbridgeDynamicPlatform extends MatterbridgeDynamicPlatf
|
|
780
785
|
this.valve?.addCommandHandler('identify', async ({ request: { identifyTime } }) => {
|
781
786
|
this.valve?.log.info(`Command identify called identifyTime:${identifyTime}`);
|
782
787
|
});
|
783
|
-
this.fan = new MatterbridgeEndpoint([fanDevice, bridgedNode, powerSource], { uniqueStorageKey: 'Fan' }, this.config.debug)
|
784
|
-
.createDefaultBridgedDeviceBasicInformationClusterServer('Fan', 'serial_980545631228', 0xfff1, 'Matterbridge', 'Matterbridge Fan', parseInt(this.version.replace(/\D/g, '')), this.version === '' ? 'Unknown' : this.version, parseInt(this.matterbridge.matterbridgeVersion.replace(/\D/g, '')), this.matterbridge.matterbridgeVersion)
|
788
|
+
this.fan = new MatterbridgeEndpoint([fanDevice, bridgedNode, powerSource], { uniqueStorageKey: 'Fan off low medium high auto' }, this.config.debug)
|
789
|
+
.createDefaultBridgedDeviceBasicInformationClusterServer('Fan auto', 'serial_980545631228', 0xfff1, 'Matterbridge', 'Matterbridge Fan', parseInt(this.version.replace(/\D/g, '')), this.version === '' ? 'Unknown' : this.version, parseInt(this.matterbridge.matterbridgeVersion.replace(/\D/g, '')), this.matterbridge.matterbridgeVersion)
|
785
790
|
.createDefaultPowerSourceWiredClusterServer()
|
786
791
|
.addRequiredClusterServers();
|
787
792
|
this.setSelectDevice(this.fan.serialNumber ?? '', this.fan.deviceName ?? '', undefined, 'hub');
|
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-1c75286",
|
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-1c75286",
|
10
10
|
"license": "MIT",
|
11
11
|
"dependencies": {
|
12
12
|
"node-ansi-logger": "3.0.1",
|
package/package.json
CHANGED