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

fix(device): disarm only currently activated sectors to support users with limited permissions #137

Closed palazzem closed 4 months ago

palazzem commented 4 months ago

Related Issues

Proposed Changes:

Instead of disarming all sectors, the AlarmDevice disarms only the currently activated sector. This change is a no-op for users as it is expected that disarming activated sectors is the same as disarming all. Instead, it's a fix for all users that have accounts with limited permissions and multiple areas, that can't use the disarm all (see #123).

A race condition may be introduced with this change if:

This race condition is an edge case that we consider negligible as it requires too many steps. Furthermore, the device will update the state anyway, going back to an armed state that can disable the sector 3.

Testing:

Arm and disarm a system.

Extra Notes (optional):

n/a

Checklist

coveralls commented 4 months ago

Pull Request Test Coverage Report for Build 7784165483


Totals Coverage Status
Change from base Build 7783650247: 0.03%
Covered Lines: 622
Relevant Lines: 666

💛 - Coveralls