-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Locks don't expose action, action_source, or action_source_name #3938
Comments
Added |
Thanks. It looks like it's working, mostly, except that the values are all still transient - they exist only for a short fraction of a second (a tenth or less), then are replaced by: action: Empty string("") (as viewed in the Z2M frontend) I think it would make sense for the empty strings and nulls to be ignored so the exposed values reflect the last actual lock operation. This is the way they worked in Z-wave. |
@wixoff that is expected, see https://www.zigbee2mqtt.io/guide/faq/#why-is-the-action-property-always-empty I've added it for all locks now. Changes will be available in the dev branch in a few hours from now. (https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html) |
Terrific, thanks! |
The converters in
/z-h-c/devices/
capture this data and send it via MQTT, but it's not exposed for discovery in Home Assistant.I have three Kwikset locks: one has a keypad (and is recognized as a Weiser 9GED18000-009), the other two are conversion deadbolts (both Kwikset 66492-001). They work very reliably with zigbee2mqtt, but there is significant functionality that -- in Home Assistant -- needs to be captured in manually-configured MQTT sensors, followed by additional processing (see below for details). This situation appears to be true for the converters for other lock manufacturers as well, including Schlage and Yale.
The currently exposed values capture lock state, battery, and apparently PIN code info (the last category I don't use).
However, there are no exposed values corresponding to action, action_source, or action_source_user.
First, action is one of the following values (from
/z-h-c/converters/fromZigbee.js
):Now action_source is one of the following (from
/z-h-c/lib/constants.js
):And finally, there is action_source_user, which is just a numeric user ID valid only for certain action and action_source values.
One additional complication is that each of these values -- action, action_source, and action_source_user -- come through via MQTT and are subsequently immediately overwritten by blank values. That means, for each lock, and each of these values in Home Assistant, I need to (a) capture each of the updates using an MQTT sensor, and (b) provide automations that selectively transfer those sensor values into input_text fields that don't get overwritten by the blanks.
I'd be happy to help implement/test any changes needed here, but sadly the "exposes" code and how it works is beyond my understanding.
Thanks!
The text was updated successfully, but these errors were encountered: