akasma74 / Hass-Custom-Alarm

It is a fork of "Yet another take on a home assistant custom alarm" that will exist until its author is back to our Earth
79 stars 29 forks source link

Have a delay for motion sensors when arming away #9

Open argykaraz opened 5 years ago

argykaraz commented 5 years ago

As described on the Home Assistant forums, link here

It would be nice to have the alarm armed_away, and have an extra option to keep the motion sensors offline for a period of time. I cant think of any other examples, but in my case I have a roomba having its cycle for about 2 hours when we leave the house. If I arm the alarm, then the motion sensors are picking up the roomba. So keeping the sensors offline using conditions or triggers would be useful.

hollapm commented 4 years ago

would be a great feature - that way a garage door could open without setting off the alarm unless I had not disarmed in say 5 mins. of a door opens give me 30 seconds, and a window instant!

akasma74 commented 4 years ago

@hollapm could you describe your use case in more details, especially how you see this feature implenented and used from users's point of view? I have a feeling that OP and you have different use cases that might require different solutions.

hollapm commented 4 years ago

My thoughts are that you have two different delay variables. I have the garage door connected to the alarm system. Id like to have it so that when we open the garage door when system is set as away, the system will wait say 5 minutes before it activates the alarm, but once the front door is open it only waits 30 seconds before triggering. This way we have time to get out of the car, then open the front door then disable the alarm from a control panel.

akasma74 commented 4 years ago

Well, I still have a feeling that you and the OP have different use cases as you want just a longer warning time for some sensors and he wants to ignore signals from some sensors for a defined period of time (and possibly not imediately after arming the alarm).

The trouble is it would require having several delayed sensors' groups with independently configurable delays. It'd require a serious change to the code and currently this approach looks more interesting to me as it offers more flexibility (but I'm not quite sure many of users would realy benefit from it).

As an alternative, I'd suggest to create a template sensor for your garage that reproduces signals of the garage door contact with 5 mins delay and use that sensor with your alarm - do you think it would help?

hollapm commented 4 years ago

Possibly, although I'd only want it that way for say when the alarm is set to away status as if im home and armed I'd likely have the sensor set to immediate. Ill look at the link you sent later.

akasma74 commented 4 years ago

You can use the delayed sensor in away config and the original door contact in home config ;)

hollapm commented 4 years ago

Perfect solution....

akasma74 commented 4 years ago

Yeah, that's the beauty of software alarms and HA - if the core has enough features, the rest can be added on HA side and configured according to individual requirements. I love the flexibility.

Just a word of warning - don't make the delay too long