Skip to content

[REQUEST] Support effort to add ZHA lock provider to Lock Code Manager integration (available via HACS) #618

@Hedda

Description

@Hedda

Anyone here have any Zigbee locks and could help test this effort to add ZHA lock provider to this Lock Code Manager integration?

@raman325 has this unofficial "Lock Code Manager" integration as a custom component available via HACS (Home Assistant Community Store) that allows you to manage user codes for locks in one location but that is so far only for Z-Wave locks (as well as virtual locks) and it is not natively integrated into Home Assistant’s settings either. Once you have configured it, this custom integration will set and clear or synchronize lock's user codes on all your locks as needed depending on how you decide to configure them:

The above linked pull request would add support for ZHA (Zigbee Home Automation) locks to that custom Lock Code Manager integration by implementing a new provider that interfaces with the zigpy DoorLock cluster (0x0101) for user code management.

There is an open feature request to support for Zigbee locks via ZHA (Zigbee Home Automation) and Zigbee2MQTT to that custom component as a workaround until the time that Home Assistant get native lock code (usercodes) functionality which can be used in combination with users (which Home Assistant is unfortunatly still missing):

By the way, Zigbee2MQTT have a huge list of supported Zigbee lock products, (which does include Aqara Door Lock S1, Aqara Door Lock S2, or Aqara Door Lock S2 Pro, but not yet the newer Aqara Smart Door Lock A100, Aqara Smart Door Lock D100, or [Aqara Smart Door Lock N100 lock models from Aqara). ZHA devs might be able to get those since Aqara is a WWHO partner(?):

Tip for development here is that you can also use this custom component with another custom component called "Virtual" that allow you to create virtual devices for Home Assistant, including entity types such as locks. If you want to try the Lock Code Manager compoenent and don't want to impact any existing locks functionality then suggest you to try setting up Lock Code Manager with Virtual locks first:

Those virtual lock entities can be used to test Lock Code Manager functionality without affecting your main locks. Because Virtual locks don't have support for setting and clearing user codes, the way this works is that user codes are persisted to disk as you set them. If you remove a Virtual lock from your configuration, the file will be removed to keep your file system clean.

Slightly off-topic but FYI, raman325 is working on matching PRs for lock providers for Matter-based locks and locks via Zigbee2MQTT as well:

PS: For reference, also see directly related architecture/developers discussion about adding built-in "native" lock code functionality to Home Assistant's core:

The lock platform natively allows users to control the lock state of a lock, but it is not possible, at least natively, to manage codes for the lock. While not all locks have this functionality, many integrations/protocols support this, including zwave_js, zigbee, matter, and proprietary WiFi/BLE locks. ... The purpose of the initial proposal is to come to a consensus that a new entity platform is needed to support codes. There are a lot of details to iron out about this platform, and we can discuss that as a follow up, but I first want to come to consensus that this is needed and that we can't use what we already have.

PPS: Please also see this feature request in Home Assistant's community forum requesting unified lock code management in HA:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions