isalkind / homebridge-away-mode

Homebridge plugin that provides triggers to turn on and turn off lights to simulate occupancy.
MIT License
26 stars 5 forks source link

On/Off-state last time trigger & 2 time slots #2

Closed zabaya closed 4 years ago

zabaya commented 4 years ago

Digging the plugin, but I've got 2 questions. If I give a specific time to end the triggers, will the trigger automatically go off at 23:00 or will it have the last state the trigger had? So for example the triggers stop at 23:00 and the motion sensor is still on, will it stay on or will it go off?

Second, if you want the triggers to activate in both the morning and the evening do I need to make separate accessories? Cause now I've made a morning and an evening Switch. But would like to have one switch that's say Away mode, so i can clean up my automation tab a little bit because now I have 12 automations based on this plugin alone. And as you probably know yourself it can be quite cumbersome to find out what is what in the automation list in Apple Home.

isalkind commented 4 years ago

1) There are two ways sensors off. First, if you turn the "away mode" switch off, all sensors will immediately turn off. Second, if you use the 'startTime'/'endTime' parameters, an active (on) sensor will always complete its cycle (assuming "away mode" switch is still on) and then turn off, i.e., it won't turn off just because the 'endTime' has passed.

2) Yes. Currently you need to make separate accessories. Let me think about that one. Seems like a reasonable use case to support.

Hope that helps.

isalkind commented 4 years ago

@zabaya I just released version 1.2.0 which will allow you to specify multiple time ranges for triggers to activate. See activeTimes configuration parameter. You can now set your morning and evening time ranges on a single switch.

zabaya commented 4 years ago

Wow dude! That’s awesome i’m gonna implement that tonight! Thanks!