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

adding a bit of error handling, cleaning up code, and updating docs #213

Merged
merged 10 commits into from
Feb 28, 2024

Conversation

cantupaz
Copy link
Collaborator

Hi. I added a little bit of error handling when arming/disarming. I got rid of the ENABLE_CODE flag that was probably confusing users in the config window (I found it confusing that I could leave the code empty and I also had to uncheck the box to get rid of the PIN).

I added a few missing type hints and updated the readme file.

README.md Outdated
![Options](./docs/images/setup.png)

- Enter the username and password for your Securitas account.
- Use 2FA (default: no). It is not necessary to use two-factor authentication to use this integration, but we're leaving that option in case Securitas changes that in the future.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @cantupaz I think that the default should be yes, enabled by default. I think all countries are actually enabling 2FA right now. That how it was in the past, and the API stopped working. I don't see Securitas not enabling the 2FA or even disabling this. I don't know where you are getting this information from, but this should be enabled by default.

@@ -50,41 +50,19 @@
CONF_DEVICE_INDIGITALL = "idDeviceIndigitall"
CONF_ENTRY_ID = "entry_id"
CONF_INSTALLATION_KEY = "instalation"
CONF_ENABLE_CODE = "enable_code"
CONF_DELAY_CHECK_OPERATION = "delay_check_operation"

DEFAULT_USE_2FA = False
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be true, look at my previous comment.

@cantupaz
Copy link
Collaborator Author

cantupaz commented Feb 27, 2024 via email

@guerrerotook
Copy link
Owner

That is not true @cantupaz, there are a lot of issues people complaining that it logged but then after some time the integration stop working, #52 here in Spain, France and other countries as well.

Again, I don't know exactly where you got that it doesn't do anything. My recommendation, for everyone should be to enable this and as you said, it this fails for you have the option to disable, but not the other way around. This works for you without the 2FA fine, but we have had a lot of issues in the past with this and I believe that not enabling this will likely result in more people opening issues because weird errors that all down to not be authenticated.

@guerrerotook
Copy link
Owner

Just to be clear, I only want you to change the default value to true, that's it. The rest of the PR is great!

@cantupaz
Copy link
Collaborator Author

cantupaz commented Feb 27, 2024 via email

@guerrerotook
Copy link
Owner

Thanks very much!, don't worry about when, take your time.

@cantupaz
Copy link
Collaborator Author

I made the changes, please take a look.

Copy link
Owner

@guerrerotook guerrerotook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks very much!

@guerrerotook guerrerotook merged commit ea9acbe into guerrerotook:main Feb 28, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants