|
1 | 1 | const {
|
2 | 2 | Pm25ConcentrationMeasurement,
|
| 3 | + Pm10ConcentrationMeasurement, |
3 | 4 | // eslint-disable-next-line import/no-unresolved
|
4 | 5 | } = require('@matter/main/clusters');
|
5 | 6 |
|
@@ -171,6 +172,18 @@ describe('Matter.init', () => {
|
171 | 172 | addMeasuredValueAttributeListener: fake.returns(null),
|
172 | 173 | });
|
173 | 174 |
|
| 175 | + // PM10 concentration measurement |
| 176 | + clusterClients.set(Pm10ConcentrationMeasurement.Complete.id, { |
| 177 | + id: Pm10ConcentrationMeasurement.Complete.id, |
| 178 | + name: 'Pm10ConcentrationMeasurement', |
| 179 | + endpointId: 1, |
| 180 | + attributes: { |
| 181 | + measuredValue: {}, |
| 182 | + }, |
| 183 | + commands: {}, |
| 184 | + addMeasuredValueAttributeListener: fake.returns(null), |
| 185 | + }); |
| 186 | + |
174 | 187 | // Mock commissioning controller
|
175 | 188 | commissioningController = {
|
176 | 189 | start: fake.resolves(null),
|
@@ -405,6 +418,18 @@ describe('Matter.init', () => {
|
405 | 418 | type: 'decimal',
|
406 | 419 | unit: 'microgram-per-cubic-meter',
|
407 | 420 | },
|
| 421 | + { |
| 422 | + category: 'pm10-sensor', |
| 423 | + external_id: 'matter:12345:1:1069', |
| 424 | + has_feedback: true, |
| 425 | + max: 1500, |
| 426 | + min: 0, |
| 427 | + name: 'Pm10ConcentrationMeasurement - 1', |
| 428 | + read_only: true, |
| 429 | + selector: matterHandler.devices[0].features[12].selector, |
| 430 | + type: 'decimal', |
| 431 | + unit: 'microgram-per-cubic-meter', |
| 432 | + }, |
408 | 433 | ],
|
409 | 434 | params: [],
|
410 | 435 | },
|
@@ -555,6 +580,18 @@ describe('Matter.init', () => {
|
555 | 580 | type: 'decimal',
|
556 | 581 | unit: 'microgram-per-cubic-meter',
|
557 | 582 | },
|
| 583 | + { |
| 584 | + category: 'pm10-sensor', |
| 585 | + external_id: 'matter:12345:1:child_endpoint:2:1069', |
| 586 | + has_feedback: true, |
| 587 | + max: 1500, |
| 588 | + min: 0, |
| 589 | + name: 'Pm10ConcentrationMeasurement - 1', |
| 590 | + read_only: true, |
| 591 | + selector: matterHandler.devices[1].features[12].selector, |
| 592 | + type: 'decimal', |
| 593 | + unit: 'microgram-per-cubic-meter', |
| 594 | + }, |
558 | 595 | ],
|
559 | 596 | params: [],
|
560 | 597 | },
|
|
0 commit comments