homebridge-script2 icon indicating copy to clipboard operation
homebridge-script2 copied to clipboard

Switch-off timer

Open emanuelpsilva opened this issue 5 years ago • 1 comments

It will be great if we can set a timer to automatically turn-off the switch after turned on!

I know we can workaround creating automations around the Homebridge-dummy switch or Homebridge-delayed-switch but why should we complicate if we can have it simple? :)

Cheers!

emanuelpsilva avatar Jan 10 '21 13:01 emanuelpsilva

In theory your on script should be able to include a built in timer to also turn the device off. If using filestate then just have your on script delete the file after a set amount of time. When using filestate HomeKit should automatically update state based on the existence of the file defined.

I’ve stopped using the plugin myself. How ever I will accept PR requests for enhancements. Though I think there are other actively maintained script plugins that might be better to use that may already include a timer function.

pponce avatar Jan 11 '21 19:01 pponce