Added zwave lock state from alarm type workaround#18996
Added zwave lock state from alarm type workaround#18996turbokongen merged 11 commits intohome-assistant:devfrom
Conversation
|
So - it looks like there are times when we expect I think you can actually simplify this PR quite a bit, if that's so. Here's what I was thinking:
if str(alarm_type) in ALARM_TYPE_STD:
if self._alarm_type_workaround:
self._state = LOCK_STATUS.get(str(alarm_type))
_LOGGER.debug("workaround: lock state set to %s -- alarm type: %s",
self._state, str(alarm_type))
if alarm_type == 21:
alarm_type_str = MANUAL_LOCK_ALARM_LEVEL.get(str(alarm_level))
else:
alarm_type_str = str(alarm_level)
self._lock_status = '{}{}'.format(LOCK_ALARM_TYPE.get(str(alarm_type)),
alarm_type_str)
return
if alarm_type == 161:
...etcThe really nice side effect of streamlining it all like this, is that our PRs should merge more cleanly. :) (edit: to be clear though, I don't think you have to - this looks like it works as-is to me. 😄 ) |
|
@ahayworth Thanks for the input. I implemented 1, but I think implementing 2 as is would cause issues with my lock, since the codes in The conflicts I imagine the 2 PRs to have are more with the setup of the workarounds, rather than their specific implementations. Specifically line 34 and probably a few more between lines 233 to 250ish. |
|
It doens’t look like you’ve added the code to handle the YRD210. Should I do some testing first before you add? |
|
Just wondering how you got HA to identify your "Vision" YRD220 as a lock? Looking through /lib/python3.6/site-packages/python_openzwave/ozw_configmanufacturer_specific.xml, the only references to both the YRD210 and 220 are: Under the Vision section, there are no locks: |
|
@Juggler00 Honestly, I have no idea. I paired the locked with my Z-Wave network, and thats what the manufacturer was. I tried removing the node and adding it again, but it still showed up as a Vision device. If I recall, it didn't show up as a lock initially. I think each node communicates its capabilities to the controller on the initial pair sequence. I also know you need the |
|
@adrum Very odd... here is what is in my zwcfg for my lock: Let me know if you need anything further or any testing done. |
|
There are additional Kwikset IDs that have not been covered. |
|
@cdkonecny hmm, the conversion kit has as a separate id? Well, it's easy enough to add that to the workaround list so those locks are covered by the device state workaround. (maybe in a separate PR since it's sorta unrelated to what @adrum is fixing here) |
|
Yes, I tested by adding ID 0446 to the list as a custom component and it
fixed them right up. I apologize for not posting in the best spot. The
more applicable thread had been shut down.
…On December 6, 2018 9:41:56 AM Matthew Treinish ***@***.***> wrote:
@cdkonecny hmm, the conversion kit has as a separate id? Well, it's easy
enough to add that to the workaround list so those locks are covered by the
device state workaround. (maybe in a separate PR since it's sorta unrelated
to what @adrum is fixing here)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
# Conflicts: # homeassistant/components/lock/zwave.py
|
@Juggler00 I believe your device matches mine based on your zwcfg, so feel free to pull this down and test it. |
|
@turbokongen After resolving all the merge conflicts from #18737, I believe this PR is ready for review. I know you and @ahayworth were discussing a refactor, but I'm hoping this could get merged and released before the refactor happens. |
I had volunteered for it but won't realistically have time to work on it until after the new year. Don't let it stop you. 😄 |
|
@turbokongen Any chance you can review this? |
|
Is it possible to modify configuration.yaml to enable other devices to use this workaround? My YRD240 (manuf. id 0x129, prod. id 0x209) suffers from the same problem, and I'd like to be able to use the workaround without modifying the hassio docker image |
|
If you need help please use our help channels: Merged PRs should not be used for support or bug reports. Thanks! |
Description:
#17386 Did not seem to fix the issues I was experiencing with my YRD220. The
access_controlvalue was set to none on my lock when events were occurring. I noticed thealarm_typevalue was being update on my lock. This PR adds a workaround to set lock state from thealarm_typevalue.This will also probably have a conflict with #18737. I can resolve the conflict, should that PR get accepted before this one. This PR is based on the workaround implementation of both of the aforementioned pull requests.
CC: @Juggler00
Checklist:
tox. Your PR cannot be merged unless tests pass