Skip to content

Release v1.2.0

Choose a tag to compare

@bigmoby bigmoby released this 09 Apr 21:11

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 atomic disarm_and_cancel() method introduced in pyasyncialarm 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
    The EVENT_HOMEASSISTANT_STOP listener is now registered via config_entry.async_on_unload, guaranteeing the socket is closed correctly both on HA shutdown and on integration unload. The coordinator exposes a dedicated async_shutdown() that calls ialarm_device.shutdown() before delegating to the parent class.

  • Removed Duplicate State Push in Coordinator
    Eliminated the redundant self.async_set_updated_data(ialarm_status) call inside _async_update_data, which was triggering a double state update on every poll cycle.


✨ New Features

  • cancel Device Trigger
    Added a new cancel trigger type to the device automation system, mapped to the cancel_alarm event. Users can now build automations that react natively to alarm cancellation directly from the HA device trigger UI.

  • IAlarm.CANCEL State Mapping
    The CANCEL state returned by pyasyncialarm is now correctly mapped to AlarmControlPanelState.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 of SCAN_INTERVAL from homeassistant.components.alarm_control_panel (an anti-pattern flagged by HA architecture guidelines) and replaced it with DEFAULT_SCAN_INTERVAL from homeassistant.helpers.entity_component.

  • Removed hass.data Anti-Pattern
    The integration no longer writes to hass.data; all shared runtime state is stored exclusively in config_entry.runtime_data, fully complying with current HA integration architecture standards.

  • DOMAIN Import Consolidation in device_trigger.py
    Removed the local re-declaration of DOMAIN and replaced it with a proper import from const.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

Full Changelog: v1.1.1...v1.2.0