Skip to content

Release v2.0.0

Latest

Choose a tag to compare

@bigmoby bigmoby released this 10 Apr 07:46

What's Changed

πŸ”Œ Persistent TCP Connection

This release upgrades to the latest version of pyasyncialarm, which introduces a persistent TCP connection to the alarm panel. The connection is now kept open across requests and automatically re-established if it drops, with one transparent retry before surfacing an error.

In practice this means:

  • Fewer TCP handshakes per poll cycle
  • No more unavailable state caused by OSError during socket receive
  • More resilient behaviour when the panel is slow or temporarily unreachable

πŸ› Bug Fixes

  • Zone sensor false positives β€” _has_alarm and _has_anomaly flags are now reset at the start of every coordinator update cycle. Previously, once a zone triggered an alarm or anomaly, the sensor would remain in that state even after the zone returned to normal.
  • CANCEL state now mapped correctly β€” when the panel returns DevStatus=3 (cancel/clear), the alarm control panel entity now shows disarmed instead of an unknown/unavailable state.
  • async_shutdown closes the socket β€” the coordinator now calls ialarm_device.shutdown() when Home Assistant stops, ensuring the TCP connection is cleanly closed instead of being left open.

✨ Improvements

  • Smarter disarm sequence β€” async_alarm_disarm now uses disarm_and_cancel() from the library, which reads the DevStatus from the panel response and only retries cancel_alarm if the panel is still in a triggered state. The previous fixed asyncio.sleep(2) has been removed.
  • Device trigger cancel β€” a new device trigger is available for automations: fires when the alarm alerts are canceled via the dedicated button.
  • DOMAIN no longer hardcoded in device_trigger.py β€” imported from const.py to avoid silent drift if the domain name changes.
  • Redundant async_set_updated_data call removed from _async_update_data in the coordinator.
  • Residual hass.data.setdefault removed from __init__.py β€” leftover from an older integration pattern, superseded by config_entry.runtime_data.

πŸ“¦ Dependencies

  • Requires the new version of pyasyncialarm with persistent TCP connection support.

Full Changelog: v1.2.0...v2.0.0