Skip to content

Commit 78d3f49

Browse files
authored
fix(matter): changing type to hold bigger value
1 parent 743de9f commit 78d3f49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/Matter/examples/MatterOccupancyWithHoldTime/MatterOccupancyWithHoldTime.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ void setup() {
171171
const uint32_t detectionInterval = 120000; // Simulate detection every 2 minutes
172172

173173
// Get current HoldTime from the sensor (can be changed by Matter Controller)
174-
uint16_t holdTime_ms = OccupancySensor.getHoldTime() * 1000; // Convert seconds to milliseconds
174+
uint32_t holdTime_ms = OccupancySensor.getHoldTime() * 1000; // Convert seconds to milliseconds
175175

176176
// Check HoldTime expiration FIRST (before processing new detections)
177177
// This ensures HoldTime can expire even if a detection occurs in the same iteration

0 commit comments

Comments
 (0)