guerrerotook / securitas-direct-new-api

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

Feature Request: Arm & Disarm without code #51

Closed DNKROZ closed 8 months ago

DNKROZ commented 2 years ago

Hi, first and foremost thank you for this custom integration, without it the Securitas alarm system lacks... a lot.

I have also installed a custom alarm panel with the "Alarmo" custom component, and also a Visonic alarm system with another custom integration, both integrations allow the arming and disarming of each system without the need to enter any codes on the keypad.

Since the default "code_disarm_required" was "false" I commented out the code option in the configuration file (code: !secret securitas_direct_code) to have the code value empty and, surprisingly .... it works! , however the "code_format" attribute is still set to "number", so the keypad still pops up in the alarm panel when trying to arm or disarm, the other integrations have this set to "null" and thus they don't show the keypad.

I've modified the alarm_control_panel.py file from the component to return a None value for the "code_format" function, however I'm not a developer and can't go much further.

Is there a way to modify this integration to return None:

return None

Instead:

return alarm.FORMAT_NUMBER

in the event the code variable from the configuration is not set?

My solution is very crude and temporary and I would very much like to have this feature merged into the main version to be able to arm/disarm every alarm panel with a button click since I'm the only one that has access to my HA instance.

Thanks in advance, best regards.

themaninspain commented 2 years ago

I'll second this request as my alarm system does not have a code

guerrerotook commented 2 years ago

Let me take a look!

jpg1961 commented 2 years ago

@DNKROZ

I had same issue where alarm control panel would popup a keypad to enter code even if I had unset the "code" key in the configuration.yaml. I managed to set code_format to null by adding it in my customize.yaml file.

Here is an excerpt of my customize.yaml file:

alarm_control_panel.name_of_my_entity:    friendly_name: "xxxx"    ## Assuming code is unset in configuration.yaml...    ## When code format is set to no_code the panel will display a field to enter    ## the pin code instead of a keypad.    ## When set to null neither field nor keypad are displayed....    code_format: null

Cheers,

DNKROZ commented 2 years ago

Hi @jpg1961

Setting up code_format to null in the customize.yaml file works like a charm, thank you! Still, would be great to have it as a feature from the integration itself, but this is a great solution for the time being

Best regards.

jpg1961 commented 2 years ago

Hi @DNKROZ, Actually, the integration uses home assistant control panel components and inherits from its code_format variable. So I guess updating the securitas-direct-new-ap integration documentation instead of adding a feature would fit the bill ;-D.

Cheers,

soth78 commented 2 years ago

Sorry, I have been unable to reproduce this. I'm on 2.0.0.2, can someone tell me how to remove the keypad so I don't need to input a code?

cantupaz commented 8 months ago

This should be working since a few releases ago