Skip to content

We should not send api calls for doorSensor if there is none configured #181

@samuellazea

Description

@samuellazea

Hello,

Based on last PR's and latest release I notice in the logs that there are api calls done for door sensors while I only have locks configured.
Would be good if we can check if there are any door sensors configured before running the calls in order to minimize the call numbers

`2025-01-15 19:51:19.729 DEBUG (MainThread) [custom_components.ttlock.api] [cc6a] Sending request to https://euapi.ttlock.com/v3/doorSensor/query with args={'lockId': 12345678}

2025-01-15 19:51:19.732 INFO (SyncWorker_4) [homeconnect.sseclient] Connecting ...

2025-01-15 19:51:19.765 DEBUG (MainThread) [custom_components.ttlock.api] [cc6a] Received response: status=200: body={'errcode': 1, 'errmsg': 'failed or means no', 'description': '表示失败或否'}

2025-01-15 19:51:19.765 DEBUG (MainThread) [custom_components.ttlock.api] [cc6a] API returned: {'errcode': 1, 'errmsg': 'failed or means no', 'description': '表示失败或否'}
`

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions