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

feat: lock() accepts a userId param if it's required to complete the login #136

Merged
merged 6 commits into from
Feb 5, 2024

Conversation

palazzem
Copy link
Owner

@palazzem palazzem commented Feb 2, 2024

Related Issues

Proposed Changes:

This change adds support for all main units that require a userId parameter, such as the ETR128.

When the system is armed and disarmed, the AlarmDevice splits and sends the userId and the code if they are both required by the main unit. The login_without_user_id value from the panel details defines if the unit requires it or not.

In case the userId is not required, that parameter is not sent. If panel details are not available, the device assumes it's not needed (true for most recent main units).

Users can insert both code directly from the alarm panel simply combining first the userId and then the code.

Example:

  • User: 010
  • Code: 987654
  • You should input in the alarm panel: 010987654

Testing:

n/a

Extra Notes (optional):

n/a

Checklist

  • Related issues and proposed changes are filled
  • Tests are defining the correct and expected behavior
  • Code is well-documented via docstrings

@palazzem palazzem added this to the 2.3.0 milestone Feb 2, 2024
@palazzem palazzem self-assigned this Feb 2, 2024
@palazzem palazzem linked an issue Feb 2, 2024 that may be closed by this pull request
@coveralls
Copy link

coveralls commented Feb 2, 2024

Pull Request Test Coverage Report for Build 7783559573

  • 0 of 17 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.2%) to 93.83%

Totals Coverage Status
Change from base Build 7759757295: 0.2%
Covered Lines: 620
Relevant Lines: 664

💛 - Coveralls

@palazzem palazzem changed the title feat: arm/disarm use the userId param if the unit requires it feat: arm/disarm use the userId param if it's required Feb 5, 2024
@palazzem palazzem changed the title feat: arm/disarm use the userId param if it's required feat: lock() accepts a userId param if it's required to complete the login Feb 5, 2024
@palazzem palazzem merged commit 3648013 into main Feb 5, 2024
5 checks passed
@palazzem palazzem deleted the palazzem/issue-123 branch February 5, 2024 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Unable to disarm alarm for units that require a userId
2 participants