Support for Aqara door lock#14125
Conversation
| return True | ||
|
|
||
|
|
||
| class XiaomiUnlockSubSensor(XiaomiBinarySensor): |
There was a problem hiding this comment.
What's this and why it's called motion?
|
|
||
| def parse_data(self, data, raw_data): | ||
| """Parse data sent by gateway.""" | ||
| if raw_data['cmd'] in ['heartbeat', 'read_ack', 'read_rsp']: |
There was a problem hiding this comment.
Do you really want to skip the heartbeat? This was/is a workaround for motion sensors.
|
Could you provide some example responses of the lock? |
|
@syssi when error:
|
|
Do you know/are there API calls for some user management? |
|
configuration like this: The user ID contains the ID type. The integer value obtained by dividing the user ID by 65536 is the ID type. The ID type value is: 1 fingerprint, 2 password, 3 proximity card, 5 check-in password. |
|
@ileler Could you tell me the product number of your acpartner.v3? It's KTBL11LM, correct? |
|
@syssi yes,you are right. |
syssi
left a comment
There was a problem hiding this comment.
The implementation looks like a WIP. There are a lot of motion sensor docstrings and copied code with misleading log messages.
|
@Danielhiversen @syssi I have already answered before, this is not a WIP.
|
Danielhiversen
left a comment
There was a problem hiding this comment.
Is it not possible to control the door lock? Only read the state of the lock?
|
yes,The official will not open the written interface for security |
|
@ileler What do you need to improve your implementation? I left some comments. |
|
@syssi No, no need. Take a look at our dialogue. Do you think there are other deficiencies in my implementation? |
|
Please answer the comments from @syssi . |
|
Yes, it may be necessary to supplement the documentation on the configuration section |
| if 'proto' not in device or int(device['proto'][0:1]) == 1: | ||
| data_key = 'status' | ||
| else: | ||
| data_key = 'motion_status' |
| else: | ||
| data_key = 'motion_status' | ||
| XiaomiBinarySensor.__init__(self, device, 'UnlockSub Sensor', | ||
| xiaomi_hub, data_key, 'motion') |
|
There should not be any "motion" in the lock sensor |
|
I hope you agree with this solution: #14419 |
Description:
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#5329
Checklist:
tox. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
REQUIREMENTSvariable (example).requirements_all.txtby runningscript/gen_requirements_all.py..coveragerc.If the code does not interact with devices: