donavanbecker / homebridge-august

The Homebridge August plugin allows you to access your August/Yale Locks from HomeKit with Homebridge.
ISC License
35 stars 8 forks source link

Bug: "Validated Error: Error: Validation code is invalid, should be six digits" if validateCode begins with zero #48

Closed jlg89 closed 1 year ago

jlg89 commented 1 year ago

Describe The Bug

If the validation code received from August begins with a zero, the plugin throws an error.

To Reproduce

This will only occur if August happens to generate a code beginning with zero.

Expected behavior

The plugin should accept any six-digit validation code, even one beginning with zero.

Relevant log output

1/27/2023, 12:51:25 PMDoor Access BridgeAugustERRORValidated Error: Error: Validation code is invalid, should be six digits

Config for homebridge-august

{
    "platform": "August",
    "name": "August",
    "credentials": {
        "augustId": "xxx@xxx",
        "password": "xxx",
        "notice": "Keep your tokens a secret!",
        "logging": "debug",
        "validateCode": "012345"
    },
    "options": {
        "devices": [
            {
                "lockId": "xxx",
                "hide_device": false,
                "lock": {
                    "hide_contactsensor": true
                }
            }
        ]
    }
}

Screenshots

No response

Device & Model

any

Node.js Version

v16.19.0

NPM Version

v8.19.3

Homebridge Version

v1.5.0

Homebridge August Plugin Version

v1.1.0

Homebridge Config UI X Plugin Version

n/a

Operating System

Linux hoobs 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l GNU/Linux

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 1 year ago

This issue has been closed as no further activity has occurred.