Manual Alarm armed_custom_bypass mode example?

Could anyone that is using the armed_custom_bypass option of the manual alarm provide an example? I think I reached the point in my setup that I need to use it since I need a way to trigger the alarm immediately if a group of sensors detect motion while the condition is armed_away but setting the delay time to zero is not an option since I need that to enter the home and disarm the alarm.

Would the custom bypass mode work here?
Thanks.

This is the automation I use which actually. the state of the alarm is already armed_away but to further command when detect motion send me notify with camera feed. You can change the service and condition to suit your need.

automation:
  - id: office_motion_to_ios
    alias: Office Motion to IOS
    trigger:
      platform: state
      entity_id: sensor.sn1_pir
      from: 'No_motion'
      to: 'Motion_Detected'
    condition:
      condition: state
      entity_id: alarm_control_panel.ssh
      state: 'armed_away'
    action:
      service: notify.ios_sun_iphone 
      data:
        message: Motion Detected at Office!
        data:
          push:
            category: camera
          entity_id: camera.office_camera

i’ve been looking for something similar. i think the short answer is your question is “no.” from here, it sounds like the use case for armed_custom_bypass is arming/disarming different zones, but i’m not sure how to implement it either.

if it helps, i have a workaround to trigger my alarm immediately. here’s my alarm code (the mqtt parts aren’t necessary if you’re not using it):

platform: manual_mqtt
name: "house alarm"
code: !secret house_alarm_code
trigger_time: 600
state_topic: home/alarm
command_topic: home/alarm/set
armed_home:
  pending_time: 0
  delay_time: 0
armed_away:
  pending_time: 90
  delay_time: 90
disarmed:
  delay_time: 0
triggered:
  pending_time: 0

and then i can trigger the alarm immediately with this script:

panic_alarm:
  sequence:
    - service: alarm_control_panel.alarm_disarm
      data:
        entity_id: alarm_control_panel.house_alarm
        code: !secret house_alarm_code
    - service: alarm_control_panel.alarm_trigger
      entity_id: alarm_control_panel.house_alarm

with disarmed delay_time = 0 and triggered pending_time = 0, the alarm will disarm immediately and calling “trigger” from the disarmed state will trigger the alarm immediately.

there are also different alarm implementations like this one that allow immediate triggering, but i didn’t want all the other bells and whistles.

2 Likes

@creakyshrimp This is great! I am already using it and works beautifully. Thank you!

Thanks for this, it does work nicely. But one thing that this does break is that once triggered, it stays in triggered state indefinitely, as opposed to going back to the an armed state after X seconds. (not sure what controls that ?)

I’m guessing that the reason is that with this solution, you go from disarmed to triggered state. Typically, it would go from an armed stated to triggered state…

Ok I found a way, simply add a delay, then disarm, then arm again. So the script logic is :

  • disarm
  • trigger
  • wait
  • disarm
  • arm

Here’s the modified script :

panic_alarm:
  sequence:
    - service: alarm_control_panel.alarm_disarm 
      data:
        code: !secret house_alarm_code
        entity_id: alarm_control_panel.house_alarm
    - service: alarm_control_panel.alarm_trigger		
      entity_id: alarm_control_panel.house_alarm
    - delay:
        minutes: 1
    - service: alarm_control_panel.alarm_disarm
      data:
        code: !secret house_alarm_code
        entity_id: alarm_control_panel.house_alarm
    - service: alarm_control_panel.alarm_arm_away
      data:
        code: !secret house_alarm_code
        entity_id: alarm_control_panel.house_alarm

Can you please show me an example of how you trigger the alarm with this script?

Thanks.