My manual alarm panel not working in hassio

hello friends i am new in home assistant community, i am using rf bridge flashed with openmqqt gateway (its simple and works great). my door sensor works correctly i added in manual alarm panel with these sensors but its not triggering in arm home and away arm mode also notifications not showing and no audio notifications coming (for audio notification i am using mopidy with google tts its also working without problem),alarm panel shows and easily accessible through code in arm modeand away mode but its didn’t notify and alarm didn’t trigger in arm and away mode and also didnt notify when disar as per automations so i am not figuring out what happens why my alarm panel not working.

here is config

    alarm_control_panel:
      - platform: manual
        name: Alarm
        code: !secret alarm_code
        trigger_time: 300
        disarmed:
          trigger_time: 0
        armed_home:
          delay_time: 0
          pending_time: 0
        armed_away:
          delay_time: 60
          pending_time: 30
        triggered:
          pending_time: 0


**here is automations.yaml**
- alias: Trigger alarm while armed home or away
  trigger:
  - platform: state
    entity_id: binary_sensor.main_door
    to: 'on'
  - platform: state
    entity_id: binary_sensor.roof_top_door
    to: 'on'
  condition:
  - condition: state
    entity_id: alarm_control_panel.alarm
    state: armed_away
  - condition: state
    entity_id: alarm_control_panel.alarm
    state: armed_home
  action:
  - service: alarm_control_panel.alarm_trigger
    entity_id: alarm_control_panel.alarm

- alias: Alarm Triggered
  trigger:
  - platform: state
    entity_id: alarm_control_panel.alarm
    to: triggered
  action:
  - service: notify.notify
    data:
      message: ALARM! The alarm has been triggered
  - service: tts.google_say
    data_template:
      entity_id: media_player.logitech_wired_speakers
      message: The Alarm has been triggered. Input the disarm code or an automated
        message will be sent to the police in 30 seconds.

- alias: Send notification when alarm is Disarmed
  initial_state: 'on'
  trigger:
  - platform: state
    entity_id: alarm_control_panel.alarm
    to: disarmed
  action:
  - service: notify.notify
    data:
      message: ALARM! The alarm is Disarmed at {{ states('sensor.date__time') }}

- alias: Send notification when alarm is in pending status
  initial_state: 'on'
  trigger:
  - platform: state
    entity_id: alarm_control_panel.alarm
    to: pending
  action:
  - service: notify.notify
    data:
      message: ALARM! The alarm is in pending status at {{ states('sensor.date__time')
        }}

- alias: Send notification when alarm is Armed in Away mode
  initial_state: 'on'
  trigger:
  - platform: state
    entity_id: alarm_control_panel.alarm
    to: armed_away
  action:
  - service: notify.notify
    data:
      message: ALARM! The alarm is armed in Away mode {{ states('sensor.date__time')
        }}
 
- alias: Send notification when alarm is Armed in Home mode
  initial_state: 'on'
  trigger:
  - platform: state
    entity_id: alarm_control_panel.alarm
    to: armed_home
  action:
  - service: notify.notify
    data:
      message: ALARM! The alarm is armed in Home mode {{ states('sensor.date__time')
        }}

Can you use the blue bar on top of the page to format your code?
I can’t see if there are indentation issues with your code that could explain why it’s not working…

indentation is correct their is no any error showing, but i dont know why its not working

well until you format your code correctly I can’t confirm this…
Please check the blue bar on top of this page.

now check why its not working

Please? :no_mouth:

The issue is your condition. By default conditions are AND
You can’t have the state to be arm_home AND arm_away at the same tome.
You need to add an OR condition:

  condition:
    - condition: or
      conditions:
      - condition: state
        entity_id: alarm_control_panel.alarm
        state: armed_away
      - condition: state
        entity_id: alarm_control_panel.alarm
        state: armed_home

thankx , but i modified the code and replaced this (condition) but still its not working.
alarm triggering not working even i didnt get any notifications about alarm trigger,(see my telegram bot posts)
I armed my alarm panel in arm_away, arm_home mode then I tried open my door those sensor set in this code but alarm not triggered and didn’t get any notifications

1 Like

here is a modified code

- alias: 'Trigger alarm while armed home or away'
  trigger:
    - platform: state
      entity_id:  binary_sensor.main_door
      to: 'on'
    - platform: state
      entity_id:  binary_sensor.roof_top_door
      to: 'on'
  condition:
    - condition: or
      conditions:
      - condition: state
        entity_id: alarm_control_panel.alarm
        state: armed_away
      - condition: state
        entity_id: alarm_control_panel.alarm
        state: armed_home
  action:
    service: alarm_control_panel.alarm_trigger
    entity_id: alarm_control_panel.alarm
- alias: 'Alarm Triggered'
  trigger:
    - platform: state
      entity_id: alarm_control_panel.alarm
      to: 'triggered'
  action:
    - service: notify.honor8x
      data:
        message: "ALARM! The alarm has been triggered"

- alias: 'Send notification when alarm is Disarmed'
  initial_state: 'on'
  trigger:
    - platform: state
      entity_id: alarm_control_panel.alarm
      to: 'disarmed'
  action:
    - service: notify.honor8x
      data:
        message: "ALARM! The alarm is Disarmed at {{ states('sensor.date__time') }}"
- alias: 'Send notification when alarm is in pending status'
  initial_state: 'on'
  trigger:
    - platform: state
      entity_id: alarm_control_panel.alarm
      to: 'pending'
  action:
    - service: notify.honor8x
      data:
        message: "ALARM! The alarm is in pending status at {{ states('sensor.date__time') }}"
- alias: 'Send notification when alarm is Armed in Away mode'
  initial_state: 'on'
  trigger:
    - platform: state
      entity_id: alarm_control_panel.alarm
      to: 'armed_away'
  action:
    - service: notify.honor8x
      data:
        message: "ALARM! The alarm is armed in Away mode {{ states('sensor.date__time') }}"
- alias: 'Send notification when alarm is Armed in Home mode'
  initial_state: 'on'
  trigger:
    - platform: state
      entity_id: alarm_control_panel.alarm
      to: 'armed_home'
  action:
    - service: notify.honor8x
      data:
        message: "ALARM! The alarm is armed in Home mode {{ states('sensor.date__time') }}"

From your config, there are no delays when your alarm is armed_home, so that’s the status I’d use to test
(your armed_away has a delay_time of 60 sec and a pending_time of 30 sec, that means when you trigger the alarm from one of your binary_sensors, the alarm state will move to pending for 60 sec (may be 90sec, I’ve not yet mastered the various delays))
From your screenshot it doesn’t look like you’re waiting long enough to the alarm to enter triggered state