palazzem / ha-econnect-alarm

Home Assistant integration that provides a full-fledged Alarm Panel to control your Elmo/IESS alarm systems.
BSD 3-Clause "New" or "Revised" License
10 stars 5 forks source link

deps: update econnect-python to 0.9.1 #116

Closed palazzem closed 6 months ago

palazzem commented 6 months ago

Related Issues

Proposed Changes:

This update refines the query() method in the client, which fetches synchronized data between the main unit and the cloud (using _get_descriptions() under the hood). Issues arise when strings are not in sync, specifically when:

  1. The central unit has defined and InUse outputs, inputs, or sectors.
  2. The cloud is not in sync, leading to missing keys (9, 10, or 12) in _get_descriptions(), causing a KeyError.

To address this, we've implemented a safer access via the dictionary get() method. Now, if a string is missing, Unknown is returned instead of an error.

Testing:

Test with a central unit where an output is InUse, but no strings are configured in the cloud.

Extra Notes (optional):

n/a

Checklist

coveralls commented 6 months ago

Pull Request Test Coverage Report for Build 7115561947


Totals Coverage Status
Change from base Build 7077754827: 0.0%
Covered Lines: 597
Relevant Lines: 629

💛 - Coveralls