Expose Event for Incorrect PIN Entry in Manual Alarm Control Panel

Hello Home Assistant Community,

I’d like to propose a feature enhancement for the Manual Alarm Control Panel (manual_alarm) integration. Currently, there isn’t a straightforward and reliable way to trigger an automation when an incorrect PIN code is entered during an arming or disarming attempt.

The Problem:

As users, we often want to implement security measures beyond just alarming when a sensor is triggered. A common desire is to take a photo, record a video, or send an immediate notification if someone attempts to disarm or arm the alarm with a wrong PIN. This acts as an early warning system for potential intruders or unauthorized access attempts.

While Home Assistant logs “Invalid alarm code provided” messages (e.g., [140172284253168] Invalid alarm code provided from homeassistant.components.websocket_api.http.connection), these are internal log entries and cannot be used directly as automation triggers via platform: event. The manual_alarm component doesn’t emit a dedicated event for this specific failure scenario.

The Proposed Solution:

I request that the manual_alarm integration be enhanced to expose a dedicated event when an incorrect PIN is entered. This could be:

  • A new event_type, for example:
    • alarm_control_panel_incorrect_code_entered
    • alarm_control_panel_bad_code_attempt
  • This event should ideally include entity_id and potentially a code_attempt_source (e.g., ui, keypad) if feasible.

Alternatively, if a direct event is not preferred, perhaps an attribute change on the alarm_control_panel entity could signal this, though a dedicated event is generally more robust for immediate triggers.

Benefits and Use Cases:

Implementing this feature would enable powerful security automations, such as:

  • Immediate photo/video capture: Trigger cameras to snap photos or record video of the person attempting to disarm the alarm with a wrong code.
  • Instant notifications: Send urgent Telegram/SMS alerts to the homeowner about a failed disarm attempt.
  • Persistent notifications: Display a prominent notification in the Home Assistant UI warning of the security breach.
  • Deterrence: Potentially play an audio message or flash lights to indicate the attempt has been logged.

This feature would significantly enhance the security capabilities and flexibility of the manual_alarm component, moving beyond basic arm/disarm functionality to proactive threat detection.

Thank you for considering this request! Please vote if you think this would be a valuable addition to Home Assistant.

Hi everyone!

I wanted to give you an update regarding the discussion about exposing an event for incorrect PIN entry in the manual alarm control panel.

I’m happy to announce that I’ve implemented this functionality and have opened a Pull Request (PR) on the Home Assistant Core repository.

What it does: I’ve introduced a new event called manual_alarm_bad_code_attempt. This event is fired whenever an invalid code is entered when attempting to arm or disarm the manual alarm control panel. The event includes useful data such as:

  • entity_id: The entity ID of the alarm concerned.
  • action: The action that was being attempted (e.g., disarmed, armed_away).
  • user_id: The user ID who made the attempt (if available).

This will allow you to create automations to receive immediate notifications on unauthorized access attempts or to log such events for auditing purposes.

You can follow the progress of the code PR here: manual: Fire bad code attempt event for invalid code attempts and add… by giuseppeg88 · Pull Request #146315 · home-assistant/core · GitHub

The documentation for the new event has also been added and can be tracked here: docs: Add manual alarm bad code attempt event by giuseppeg88 · Pull Request #39426 · home-assistant/home-assistant.io · GitHub

Thanks for the discussion and interest in this feature! I hope it proves useful.