Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QuickArm without code #170

Open
cerede2000 opened this issue Nov 20, 2023 · 8 comments
Open

QuickArm without code #170

cerede2000 opened this issue Nov 20, 2023 · 8 comments
Assignees
Labels
enhancement New feature or request

Comments

@cerede2000
Copy link

The Sector Alarm application allows you to activate a quick mode that does not require a code to activate the alarm.
As an improvement, I suggest checking if this mode is activated and bypassing the mandatory code request.

For this in coordinator.py I added at line 167 after :

data[panel["PanelId"]]["codelength"] = response_getpanel.get(
    "PanelCodeLength"
)

This :

data[panel["PanelId"]]["quickarm"] = response_getpanel.get(
    "QuickArmEnabled"
)

Then in alarm_control_panel.py I modified the check on lines 90 and 119:
if (code and len(code) == self.coordinator.data[self._panel_id]["codelength"]) or self._quickarm:

After that activation no longer requires a code when the QuickArm setting is enabled 👍

@gjohansson-ST
Copy link
Owner

Thanks for providing input. I suppose this is only valid for arm_away?

@gjohansson-ST gjohansson-ST self-assigned this Nov 20, 2023
@gjohansson-ST gjohansson-ST added the enhancement New feature or request label Nov 20, 2023
@cerede2000
Copy link
Author

cerede2000 commented Nov 20, 2023 via email

@gjohansson-ST
Copy link
Owner

Ok. So valid for both arm_away and arm_home?

@cerede2000
Copy link
Author

cerede2000 commented Nov 20, 2023 via email

@klercker
Copy link

klercker commented Nov 21, 2023 via email

@cerede2000
Copy link
Author

Personally I prefer not to put my alarm code in Home Assistant.
Having the QuickArm activated means you don't have to do it.

Not adding activation/deactivation is understandable, but at least managing on the activation code side the fact that this option could be activated externally to the integration is just enough.

Don't you agree?

@gjohansson-ST
Copy link
Owner

Yes And you can Enable or disable this feature with : https://mypagesapi.sectoralarm.net/api/Settings/SetPanelSettings {  "Quickarm": true,  "Password": "xxx. ",  "Displayname": "xxxxxx",  "PanelId": "xxxxxxx" } Cordialement B.Cerede, Le 20 nov. 2023 à 23:16 +0100, G Johansson @.***>, a écrit :

What is Password in the payload?

@cerede2000
Copy link
Author

This is the password which allows access to the API, which is entered initially in the integration configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants