Skip to content

Commit f84a1b5

Browse files
committed
Removes additional delay to subsequent checks to prevent compounding delays in checking sensor at its send_interval + configured delay
1 parent 086a19d commit f84a1b5

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/platformAccessory.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,10 @@ export class TempStickAccessory {
166166
`Next Checkin is invalid: ${this.accessory.context.device.next_checkin}`,
167167
`Unsuccessfully parsed the next checkin date of the sensor ${this.accessory.context.sensor_id}`));
168168
}
169-
let timeBetweenSubsequent = parseInt(this.accessory.context.device.send_interval) * 1000 + sensorDelay;
169+
const timeBetweenSubsequent = parseInt(this.accessory.context.device.send_interval) * 1000 + sensorDelay;
170170
// Add additional user defined delay from plugin configuration, in seconds, to milliseconds
171171
if (this.platform.config.delay) {
172172
timeToNext += (parseInt(this.platform.config.delay) * 1000);
173-
timeBetweenSubsequent += (parseInt(this.platform.config.delay) * 1000);
174173
}
175174
const initialRun = setInterval(async () => {
176175
// only run the initial once to get on the correct sensor send_interval to retrieve sensor results as soon as possible

0 commit comments

Comments
 (0)