66 TranslatedValueID ,
77 ValueMetadata ,
88 DeviceClass ,
9+ Duration ,
910 CommandClass ,
1011 InterviewStage ,
1112 ZWaveLibraryTypes ,
@@ -312,12 +313,17 @@ interface NodeStateSchema14 extends NodeStateSchema10 {
312313 keepAwake : boolean ;
313314}
314315
315- type NodeStateSchema15 = Omit < NodeStateSchema14 , "commandClasses" > ;
316+ type NodeStateSchema29 = Omit < NodeStateSchema14 , "commandClasses" > ;
316317
317- interface NodeStateSchema30 extends NodeStateSchema15 {
318+ interface NodeStateSchema30 extends NodeStateSchema29 {
318319 lastSeen : MaybeNotKnown < Date > ;
319320}
320321
322+ interface NodeStateSchema31 extends NodeStateSchema30 {
323+ defaultVolume ?: number ;
324+ defaultTransitionDuration ?: string ;
325+ }
326+
321327export type NodeState =
322328 | NodeStateSchema0
323329 | NodeStateSchema1
@@ -327,8 +333,9 @@ export type NodeState =
327333 | NodeStateSchema7
328334 | NodeStateSchema10
329335 | NodeStateSchema14
330- | NodeStateSchema15
331- | NodeStateSchema30 ;
336+ | NodeStateSchema29
337+ | NodeStateSchema30
338+ | NodeStateSchema31 ;
332339
333340interface FoundNodeStateSchema19 {
334341 nodeId : number ;
@@ -643,12 +650,19 @@ export const dumpNode = (node: ZWaveNode, schemaVersion: number): NodeState => {
643650 }
644651
645652 if ( schemaVersion <= 29 ) {
646- return node14 as NodeStateSchema15 ;
653+ return node14 as NodeStateSchema29 ;
647654 }
648655
649656 const node30 = node14 as Partial < NodeStateSchema30 > ;
650657 node30 . lastSeen = node . lastSeen ;
651- return node30 as NodeStateSchema30 ;
658+ if ( schemaVersion <= 30 ) {
659+ return node30 as NodeStateSchema30 ;
660+ }
661+
662+ const node31 = node30 as NodeStateSchema31 ;
663+ node31 . defaultVolume = node . defaultVolume ;
664+ node31 . defaultTransitionDuration = node . defaultTransitionDuration ;
665+ return node31 ;
652666} ;
653667
654668export const dumpFoundNode = (
0 commit comments