YET another take on an alarm system

Hi there,

I’m having some strange issues… I have setup so that I use the HASwitchPlate (HA SwitchPlate - DIY LCD Touchscreen wall switch replacement) as my input for the alarm system. And it works great! Except for one situation where I can’t find what is wrong.

So I can arm the system from my alarm page och the HASwitchPlate, and put my code in on the touch-numpad to disarm it (first numbers then i Push “disarm”). In addition to this I have a script running, flashing a light on and off, while the system is arming(i.e. Pending). I then tried to add a similar light flashing if the system goes into triggered mode. But for some reason I’m not able to disarm it from my touch-numpad while it is in triggered mode!

Here are my scripts:

## Flashing Alarm Light While Arming
flash_arming_light1:
    alias: Flash Arming Light Loop 1
    sequence:
      - alias: Turn light on to Blue loop 1
        service: light.turn_on
        data:
          entity_id: light.sn1_led
          brightness: 255
          color_name: blue
      - delay:
          # time for flash light on
          seconds: 1
      - alias: Move to loop 2
        service: script.turn_on
        data:
          entity_id: script.flash_arming_light2
flash_arming_light2:
    alias: Flash Arming Light Loop 2
    sequence:
      - alias: Turn light on and to red loop 2
        service: light.turn_on
        data:
          entity_id: light.sn1_led
          brightness: 255
          color_name: purple
      - delay:
          # time for flash light on
          seconds: 1
      - alias: Move back to loop 1
        service: script.turn_on
        data:
          entity_id: script.flash_arming_light1
          
## Alarm Triggered
flash_trigger_light1:
    alias: Flash Trigger Light Loop 1
    sequence:
      - alias: Trigger loop 1
        service: light.turn_on
        data:
          entity_id: light.sn1_led
          brightness: 255
          color_name: red
      - delay:
          # time for flash light on
          seconds: 1
      - alias: Move to loop 2
        service: script.turn_on
        data:
          entity_id: script.flash_trigger_light2
flash_trigger_light2:
    alias: Flash Trigger Light on Loop 2
    sequence:
      - alias: Trigger loop 2
        service: light.turn_off
        data:
          entity_id: light.sn1_led
      - delay:
          # time for flash light on
          seconds: 1
      - alias: Move back to loop 1
        service: script.turn_on
        data:
          entity_id: script.flash_trigger_light1

And here are my automations:

Light go Red When armed

  • id: light_armed
    alias: ‘[Alarm] Armed Light On’
    trigger:
    • platform: state
      entity_id: alarm_control_panel.house
      to: ‘armed_away’
      action:
    • service: script.turn_off
      data:
      entity_id: script.flash_arming_light1
    • service: script.turn_off
      data:
      entity_id: script.flash_arming_light2
    • service: light.turn_on
      data:
      entity_id: light.sn1_led
      brightness: 255
      color_name: red

Light go Green When disarmed

  • id: light_disarmed
    alias: ‘[Alarm] Disarmed Light On’
    trigger:
    • platform: state
      entity_id: alarm_control_panel.house
      to: ‘disarmed’
      action:
    • service: script.turn_off
      data:
      entity_id: script.flash_trigger_light1
    • service: script.turn_off
      data:
      entity_id: script.flash_trigger_light2
    • service: light.turn_on
      data:
      entity_id: light.sn1_led
      brightness: 255
      color_name: green

Blinking light while arming

  • id: light_arming
    alias: ‘[Alarm] Arming Light On’
    trigger:
    • platform: state
      entity_id: alarm_control_panel.house
      to: ‘pending’
      action:
    • service: script.turn_on
      data:
      entity_id: script.flash_arming_light1

Blinking light if Triggered

  • id: light_trigger
    alias: ‘[Alarm] Trigger Light On’
    trigger:
    • platform: state
      entity_id: alarm_control_panel.house
      to: ‘triggered’
      action:
    • service: script.turn_on
      data:
      entity_id: script.flash_trigger_light1

Any ideas?