Release v1.2.0
This is a minor feature & improvement release (Minor) that synchronises the integration with the latest pyasyncialarm library, improves the disarm flow reliability, removes several anti-patterns flagged by HA architecture reviews, and keeps all dependencies and CI actions up to date.
🔧 Bug Fixes & Stability
-
Atomic Disarm & Cancel Flow
Replaced the previous unreliable two-step sequence (disarm()→asyncio.sleep(2)→cancel_alarm()) with the new atomicdisarm_and_cancel()method introduced inpyasyncialarm 2.4.0. A warning is now logged if the panel does not confirm a non-triggered state after all cancel attempts, making failure scenarios visible instead of silent. -
Proper Connection Cleanup on HA Stop
TheEVENT_HOMEASSISTANT_STOPlistener is now registered viaconfig_entry.async_on_unload, guaranteeing the socket is closed correctly both on HA shutdown and on integration unload. The coordinator exposes a dedicatedasync_shutdown()that callsialarm_device.shutdown()before delegating to the parent class. -
Removed Duplicate State Push in Coordinator
Eliminated the redundantself.async_set_updated_data(ialarm_status)call inside_async_update_data, which was triggering a double state update on every poll cycle.
✨ New Features
-
cancelDevice Trigger
Added a newcanceltrigger type to the device automation system, mapped to thecancel_alarmevent. Users can now build automations that react natively to alarm cancellation directly from the HA device trigger UI. -
IAlarm.CANCELState Mapping
TheCANCELstate returned bypyasyncialarmis now correctly mapped toAlarmControlPanelState.DISARMED, preventing the panel from getting stuck in an unknown state when the alarm is cancelled from the physical keypad.
🏗️ Code Quality & Architecture
-
Replaced Deprecated
SCAN_INTERVAL
Removed the import ofSCAN_INTERVALfromhomeassistant.components.alarm_control_panel(an anti-pattern flagged by HA architecture guidelines) and replaced it withDEFAULT_SCAN_INTERVALfromhomeassistant.helpers.entity_component. -
Removed
hass.dataAnti-Pattern
The integration no longer writes tohass.data; all shared runtime state is stored exclusively inconfig_entry.runtime_data, fully complying with current HA integration architecture standards. -
DOMAINImport Consolidation indevice_trigger.py
Removed the local re-declaration ofDOMAINand replaced it with a proper import fromconst.py, ensuring a single source of truth.
📦 Dependencies & CI Updated
| Component | From | To |
|---|---|---|
pyasyncialarm |
2.3.17 |
2.4.0 |
setuptools |
80.9.0 |
82.0.1 |
wheel |
~0.45.0 |
~0.46.3 |
pytest-homeassistant-custom-component |
0.13.320 |
0.13.322 |
actions/checkout |
v4 |
v6 |
actions/setup-python |
v5 |
v6 |
codecov/codecov-action |
v4 |
v6 |
github/codeql-action |
v3 |
v4 |
| Minimum Home Assistant | 2024.12.3 |
2026.3.4 |
What's Changed
- Bump github/codeql-action from 3 to 4 by @dependabot[bot] in #115
- Bump actions/checkout from 4 to 6 by @dependabot[bot] in #116
- Update wheel requirement from ~=0.45.0 to ~=0.46.3 by @dependabot[bot] in #117
- Bump codecov/codecov-action from 4 to 6 by @dependabot[bot] in #118
- Bump actions/setup-python from 5 to 6 by @dependabot[bot] in #119
- Bump pytest-homeassistant-custom-component from 0.13.320 to 0.13.322 by @dependabot[bot] in #121
- Bump setuptools from 80.9.0 to 82.0.1 by @dependabot[bot] in #120
Full Changelog: v1.1.1...v1.2.0