palazzem / econnect-python

API adapter used to control programmatically an Elmo alarm system
BSD 3-Clause "New" or "Revised" License
8 stars 5 forks source link

Extend Arm() and Disarm() to enable/disable one or multiple sectors #46

Closed palazzem closed 4 years ago

palazzem commented 4 years ago

Overview

Follow-up of #44

Extends arm() and disarm() public APIs, so that one or multiple sectors can be armed/disarmed. The API change is backward compatible because sectors is an optional kwarg.

Usage

client.arm()        # Arm all sectors
client.arm([3, 4])  # Arm only sectors 3 and 4
client.disarm()     # Disarm all sectors
client.disarm([3])  # Disarm only sector 3