pponce/homebridge-script2

Switch-off timer

Opened this issue · 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!

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.