@@ -596,7 +596,7 @@ export const occupancy_with_timeout: Fz.Converter<"msOccupancySensing", undefine
596596 if ( timeout !== 0 ) {
597597 const timer = setTimeout ( ( ) => {
598598 publish ( { occupancy : false } ) ;
599- } , timeout * 1000 ) ;
599+ } , timeout * 1000 ) . unref ( ) ;
600600
601601 globalStore . putValue ( msg . endpoint , "occupancy_timer" , timer ) ;
602602 }
@@ -1099,7 +1099,7 @@ export const ias_vibration_alarm_1_with_timeout: Fz.Converter<"ssIasZone", undef
10991099 if ( timeout !== 0 ) {
11001100 const timer = setTimeout ( ( ) => {
11011101 publish ( { vibration : false } ) ;
1102- } , timeout * 1000 ) ;
1102+ } , timeout * 1000 ) . unref ( ) ;
11031103
11041104 globalStore . getValue ( msg . endpoint , "timers" ) . push ( timer ) ;
11051105 }
@@ -1293,7 +1293,7 @@ export const ias_occupancy_alarm_1_with_timeout: Fz.Converter<"ssIasZone", undef
12931293 clearTimeout ( globalStore . getValue ( msg . endpoint , "timer" ) ) ;
12941294
12951295 if ( timeout !== 0 ) {
1296- const timer = setTimeout ( ( ) => publish ( { occupancy : false } ) , timeout * 1000 ) ;
1296+ const timer = setTimeout ( ( ) => publish ( { occupancy : false } ) , timeout * 1000 ) . unref ( ) ;
12971297 globalStore . putValue ( msg . endpoint , "timer" , timer ) ;
12981298 }
12991299
@@ -1470,7 +1470,7 @@ export const command_move: Fz.Converter<"genLevelCtrl", undefined, ["commandMove
14701470 const property = postfixWithEndpointName ( "brightness" , msg , model , meta ) ;
14711471 const deltaProperty = postfixWithEndpointName ( "action_brightness_delta" , msg , model , meta ) ;
14721472 publish ( { [ property ] : brightness , [ deltaProperty ] : delta } ) ;
1473- } , intervalOpts ) ;
1473+ } , intervalOpts ) . unref ( ) ;
14741474
14751475 globalStore . putValue ( msg . endpoint , "simulated_brightness_timer" , timer ) ;
14761476 }
@@ -1911,7 +1911,7 @@ export const checkin_presence: Fz.Converter<"genPollCtrl", undefined, ["commandC
19111911 // Stop existing timer because presence is detected and set a new one.
19121912 clearTimeout ( globalStore . getValue ( msg . endpoint , "timer" ) ) ;
19131913
1914- const timer = setTimeout ( ( ) => publish ( { presence : false } ) , timeout * 1000 ) ;
1914+ const timer = setTimeout ( ( ) => publish ( { presence : false } ) , timeout * 1000 ) . unref ( ) ;
19151915 globalStore . putValue ( msg . endpoint , "timer" , timer ) ;
19161916
19171917 return { presence : true } ;
0 commit comments