Add read-only support for lock #145
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Based on recently released but not yet merged documentation for the lock (https://github.com/OpenWonderLabs/SwitchBotAPI-BLE/blob/4261be8ec49f8b181c54b786b3479c03ad5f80b8/devicetypes/lock.md)
Tested on a sample of one, so I couldn't verify the data related to double lock mode but maybe someone else can verify that part.
Let's hope SwitchBot releases actions for the lock sooner rather than later, but in the meantime maybe we could at least enjoy the read-only part.
PS. after reading through code I wasn't sure which naming convention should I use do I went with snake_case but I can change that if need be