File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -98,16 +98,18 @@ export class ValveAccessory extends BaseAccessory<ValveConfig> {
9898
9999 override onUpdate ( key : HKCharacteristicKey , value : CharacteristicValue , logString : string | undefined = undefined ) : boolean {
100100
101+ const changed = super . onUpdate ( key , value , logString ) ;
102+
101103 if ( this . simulateDuration && key === HKCharacteristicKey . InUse ) {
102104
103- if ( value === this . Characteristic . InUse . IN_USE ) {
105+ if ( changed && value === this . Characteristic . InUse . IN_USE ) {
104106 this . startTimerSimulator ( ) ;
105107 } else if ( value === this . Characteristic . InUse . NOT_IN_USE ) {
106108 this . stopTimerSimulator ( ) ;
107109 }
108110 }
109111
110- return super . onUpdate ( key , value , logString ) ;
112+ return changed ;
111113 }
112114
113115 private get remainingDuration ( ) : number {
You can’t perform that action at this time.
0 commit comments