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
Ignore duplicate state changes GarageDoor HomeKit #18149
Conversation
Thanks for addressing this bug. Can you please also implement for locks? |
@wasp100 I would, but why do you think this is necessary? For garage doors I could reproduce your issue, but that doesn't exist for locks, or am I missing something? |
In my previous testing, when using the homekit lock function, when running a scene to lock all doors at night, it would trigger the relay even though the door was locked. Essentially the same issue that exists with the garage door. |
Yeah, I does. But that happens with every accessory and I don't really see the negative consequences that exists for the garage door representation. |
Correct, it has no negative effect on the implementation of the garage door opener. The lock function should also be addressed because it poses a security risk, ie, it unlocks an already locked door when running an automation to ensure the doors are locked. |
I don't see that. Since the lock implementation uses no transitioning states in contrast to the garage door, the only thing that happens is an additional call to lock an already locked door. |
I’ll test again and revert back to you. |
@cdce8p HomeKit supports transitioning states for locks. I never got around to experiencing/fixing this scenario because I'm still waiting on a fix for my ZWave locks to properly function. |
@adrum Technical correct, however we don't set them like we do with the garage door here: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/homekit/type_covers.py#L48-L53 |
Yes I assumed this might be the case without digging into it. Should we add support for this temporary state scenario around here: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/homekit/type_locks.py#L52 |
There is no need to add anything for locks. As I've said, I would just call lock again without any consequences. Thus there is no need to ignore the call. Especially considering that we don't know if the internal state is correct: #17453 (comment) |
I now have 2 questions:
|
To be honest, in most situations the internal state should be correct. At least I haven't seen anything else, since I started using HA. IMO we should be fine with the way it's now, but if you like to, I can allow the service_call. |
@adrum I've update the PR to account for 1) |
Hi @cdce8p, |
Would ignoring the service call help resolve this as I’ve never found the internal state to be incorrect. |
@wasp100 We shouldn't discuss this here, since the PR is already closed. Please open a new issue for this and link me. However I don't want to give you false hope, I tested it again a moment ago an everything works as expected. I believe the issue is with your setup (more specific the relays). Please post the configs for those too if you open an issue. |
Description:
Ignore duplicate state chage calls from HomeKit for GarageDoor accessories. Those could happen with the use of HomeKit automations. This PR is necessary after I had to revert the HAP-python update #18069. It's also largely based on the work @adrum did with #17453. Just added the tests for it.
Related issue (if applicable): fixes #17557
Checklist:
tox
. Your PR cannot be merged unless tests passCC: @wasp100