XaF / qolsysgw

Qolsys IQ Panel 2+ gateway to an Home Assistant Alarm Control Panel
MIT License
131 stars 13 forks source link

Report when the panel is not being armed as sensors are currently open #65

Closed XaF closed 1 year ago

XaF commented 1 year ago

When sending an arming message to the panel without bypass but sensors are open, the panel will simply not arm. Maybe this could be handled in qolsysgw so we could easily know in Home Assistant when an arming action failed.

Alternatively, it could be handled in Home Assistant directly through an automation that, when requesting to arm, would check a few seconds after if the arming status changed. This however is not as flexible as would require adding that handler everywhere we're trying to arm.

XaF commented 1 year ago

This is actually already solved by #42 This is what is emitted when the panel when the arm is failing:

{
  "event": "ERROR",
  "partition_id": 0,
  "error_type": "ARM_FAILED",
  "description": "Zones not bypassed",
  "version": 1,
  "nonce": "qolsys",
  "requestID": "864a86c9-2875-42dd-8654-81ee816d7f24"
}
murkumurdok commented 1 year ago

Hi, how would I implement this in an HA automation? The requestID changes dynamically with each MQTT event so I'm not sure how to use it as an automation trigger. Maybe some kind of template?

EDIT: Nevermind, I figured it out. For anyone curious, here is the trigger:

trigger:
  - platform: mqtt
    topic: qolsys/qolsys_panel/event
    payload: Zones not bypassed
    value_template: "{{ value_json.description }}"