guerrerotook / securitas-direct-new-api

This repository contains the new securitas direct API that can be integrated in Home Assistant
Apache License 2.0
73 stars 30 forks source link

support for PERI alarms (again) #203

Closed cantupaz closed 5 months ago

cantupaz commented 6 months ago

In the last pull request I somehow messed up pushing all the code to support PERI alarms. This pull request fixes that. Not sure what I did, but sorry for the thrashing.

The main changes are in alarm_control_panel.py to map from HA states (like STATE_ALARM_ARMED_AWAY to SecDirAlarmState.TOTAL_ARMED).

The last pull request had the part where the API manager translates that desired state into a command (so the TOTAL_ARMED will send a "ARM1"

This pull request should fix https://github.com/guerrerotook/securitas-direct-new-api/issues/201

I've been running this code on my installation for a few days without issue