nfarina / homebridge-dummy

Dummy switches for Homebridge: https://github.com/nfarina/homebridge
267 stars 81 forks source link

Switch delay in minutes and hours #81

Closed mkz212 closed 10 months ago

mkz212 commented 1 year ago

Hi.

Please add option to set delay also in seconds, minutes and hours and calculate total. E.G. when i put 1 in hours and 15 minut it will calculate total 1 hour and 15 minutes. E.G. 2:

And when total is larger than 10 minutes it should use filesystem. Then it will work also if homebridge is restarted.

total = (hours * 3600000) + (minutes * 60000) + (seconds * 1000) + miliseconds; 

if (total > 600000) {
// use file system
}
else {
// setTimeout
}
mkz212 commented 1 year ago

What is maximum delay now?

mkz212 commented 1 year ago

included in #84