Skip to content

Commit

Permalink
Fixed MeasurementClusters
Browse files Browse the repository at this point in the history
  • Loading branch information
Luligu committed Jul 1, 2024
1 parent 084baf0 commit c43fef6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3,042 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ If you like this project and find it useful, please consider giving it a star on

### Fixed
- [matterbridge]: Fixed nodeLabel in childbridge mode
- [matterbridge]: Fixed MeasurementClusters

<a href="https://www.buymeacoffee.com/luligugithub">
<img src="./yellow-button.png" alt="Buy me a coffee" width="120">
Expand Down
8 changes: 4 additions & 4 deletions src/cluster/ElectricalPowerMeasurementCluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ export namespace ElectricalPowerMeasurement {
*
* @see {@link MatterSpecification.v13.Cluster} § 2.13.6.19
*/
neutralCurrent: OptionalAttribute(0x12, TlvNullable(TlvInt64.bound({ min: -262, max: 262 })), { default: null }),
neutralCurrent: OptionalAttribute(0x12, TlvNullable(TlvInt64.bound({ min: -(2 ** 62), max: 2 ** 62 })), { default: null }),
},
});

Expand Down Expand Up @@ -649,7 +649,7 @@ export namespace ElectricalPowerMeasurement {
*
* @see {@link MatterSpecification.v13.Cluster} § 2.13.6.5
*/
voltage: OptionalAttribute(0x4, TlvNullable(TlvInt64.bound({ min: -262, max: 262 })), { default: null }),
voltage: OptionalAttribute(0x4, TlvNullable(TlvInt64.bound({ min: -(2 ** 62), max: 2 ** 62 })), { default: null }),

/**
* This shall indicate the most recent ActiveCurrent reading in milliamps (mA).
Expand All @@ -670,7 +670,7 @@ export namespace ElectricalPowerMeasurement {
*
* @see {@link MatterSpecification.v13.Cluster} § 2.13.6.6
*/
activeCurrent: OptionalAttribute(0x5, TlvNullable(TlvInt64.bound({ min: -262, max: 262 })), { default: null }),
activeCurrent: OptionalAttribute(0x5, TlvNullable(TlvInt64.bound({ min: -(2 ** 62), max: 2 ** 62 })), { default: null }),

/**
* This shall indicate the most recent ActivePower reading in milliwatts (mW). If the power cannot be
Expand All @@ -692,7 +692,7 @@ export namespace ElectricalPowerMeasurement {
*
* @see {@link MatterSpecification.v13.Cluster} § 2.13.6.9
*/
activePower: Attribute(0x8, TlvNullable(TlvInt64.bound({ min: -262, max: 262 })), { default: null }),
activePower: Attribute(0x8, TlvNullable(TlvInt64.bound({ min: -(2 ** 62), max: 2 ** 62 })), { default: null }),
},

events: {
Expand Down
Loading

0 comments on commit c43fef6

Please sign in to comment.