Closed cantupaz closed 8 months ago
Hey @cantupaz, is this ready for review?
Yes. Let me explain what I did.
In the API manager I tried to capture the possible states that the alarm can have (in securitas_direct_new_api/const.py). This is by looking at the securitas app and website, independent of HA. Then I map those states (like AlarmStates.total_armed) to the commands we need to send in the API ("ARM1" ). The mapping of states to commands can be different depending on having a peri alarm, so that's a parameter to the ApiManager.
In this version, the HA integration doesn't use the commands at all. It uses the AlarmStates and lets the ApiManager figure which mapping from states to commands it needs to use.
I changed the login form a little to add the option for peri and to make some text clearer (I hope). Same with the options form.
to resolve this issue: https://github.com/guerrerotook/securitas-direct-new-api/issues/193