Skip to content

Commit f45d095

Browse files
committed
update hap characteristics and services
1 parent e76d51f commit f45d095

5 files changed

Lines changed: 30 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ All notable changes to `hap-nodejs` will be documented in this file. This projec
99
- dependency updates
1010
- code style - use `subarray` instead of `slice` for buffers
1111
- fix types around buffers in test files
12+
- update hap characteristics and services
1213

1314
## v2.0.1 (2025-07-23)
1415

src/lib/Characteristic.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ import type {
7070
FilterChangeIndication,
7171
FilterLifeLevel,
7272
FirmwareRevision,
73+
FirmwareUpdateProtocolList,
7374
FirmwareUpdateReadiness,
7475
FirmwareUpdateStatus,
7576
HardwareFinish,
@@ -938,6 +939,10 @@ export class Characteristic extends EventEmitter {
938939
* @group Characteristic Definitions
939940
*/
940941
public static FirmwareRevision: typeof FirmwareRevision;
942+
/**
943+
* @group Characteristic Definitions
944+
*/
945+
public static FirmwareUpdateProtocolList: typeof FirmwareUpdateProtocolList;
941946
/**
942947
* @group Characteristic Definitions
943948
*/

src/lib/definitions/CharacteristicDefinitions.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,12 @@ describe("CharacteristicDefinitions", () => {
400400
});
401401
});
402402

403+
describe("FirmwareUpdateProtocolList", () => {
404+
it("should be able to construct", () => {
405+
new Characteristic.FirmwareUpdateProtocolList();
406+
});
407+
});
408+
403409
describe("FirmwareUpdateReadiness", () => {
404410
it("should be able to construct", () => {
405411
new Characteristic.FirmwareUpdateReadiness();

src/lib/definitions/CharacteristicDefinitions.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1367,6 +1367,23 @@ export class FirmwareRevision extends Characteristic {
13671367
}
13681368
Characteristic.FirmwareRevision = FirmwareRevision;
13691369

1370+
/**
1371+
* Characteristic "Firmware Update Protocol List"
1372+
*/
1373+
export class FirmwareUpdateProtocolList extends Characteristic {
1374+
1375+
public static readonly UUID: string = "0000026F-0000-1000-8000-0026BB765291";
1376+
1377+
constructor() {
1378+
super("Firmware Update Protocol List", FirmwareUpdateProtocolList.UUID, {
1379+
format: Formats.TLV8,
1380+
perms: [Perms.PAIRED_READ],
1381+
});
1382+
this.value = this.getDefaultValue();
1383+
}
1384+
}
1385+
Characteristic.FirmwareUpdateProtocolList = FirmwareUpdateProtocolList;
1386+
13701387
/**
13711388
* Characteristic "Firmware Update Readiness"
13721389
*/

src/lib/definitions/ServiceDefinitions.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,7 @@ export class FirmwareUpdate extends Service {
593593
this.addCharacteristic(Characteristic.FirmwareUpdateStatus);
594594

595595
// Optional Characteristics
596+
this.addOptionalCharacteristic(Characteristic.FirmwareUpdateProtocolList);
596597
this.addOptionalCharacteristic(Characteristic.MatterFirmwareUpdateStatus);
597598
this.addOptionalCharacteristic(Characteristic.StagedFirmwareVersion);
598599
this.addOptionalCharacteristic(Characteristic.SupportedFirmwareUpdateConfiguration);

0 commit comments

Comments
 (0)