Alarm_control_panel feedback problem

Hello guys, i’m using alarm_control_panel for controlling the sonoff, if the code is right then it will trigger the son off using automation. but the problem is when user inputs the pin code wrong, it should give the user notification that his entered code is wrong, so how do i make this in home assistant?
Thank You.

I have a short automation triggered by a system log event:

- id: '1614704381038'
  alias: Keypad code invalid
  description: ''
  trigger:
  - platform: event
    event_type: system_log_event
  condition:
  - condition: template
    value_template: '{{ "Invalid code" in trigger.event.data.message[0] }}'
  action:
  - service: sonos.snapshot
    data: {}
    entity_id: media_player.kitchen
  - service: media_player.volume_set
    entity_id: media_player.kitchen
    data:
      volume_level: 0.5
  - service: tts.cloud_say
    data:
      entity_id: media_player.kitchen
      message: Sorry. Thats the wrong code.
      language: en-GB
      options:
        gender: male
  - delay:
      hours: 0
      minutes: 0
      seconds: 5
      milliseconds: 0
  - service: sonos.restore
    data: {}
    entity_id: media_player.kitchen
  mode: single

oh i see the trigger is system log event. actually i have 3 alarm panel for my project. is it possible to make the automation for each of it?

Do you mean you want a different message for each alarm panel, or the same message for all of them? I only have one, so this is not something I’ve tried.

The full log messages are simply “Invalid code given for armed_away” and “Invalid code given for disarmed”, so I would expect the one automation to work for any number of panels, but you wouldn’t be able to differentiate between them. You could have different messages for arming and disarming, though, by including more of the log message in the trigger.

1 Like

Come to think of it, if I had more than one panel I would have to distinguish between them to get the message playing on the right speaker. I would probably use motion detectors for that - I don’t think the log message contains enough information.

1 Like

okay thank you for your explanation. that helps me alot :slight_smile: