Skip to content

Conversation

@raman325
Copy link
Owner

@raman325 raman325 commented Jan 5, 2026

Proposed change

Adds support for Zigbee2MQTT locks by publishing/subscribing to MQTT topics. This enables user code management for locks exposed via Zigbee2MQTT:

  • Detects Zigbee2MQTT devices by their device identifiers (zigbee2mqtt_*)
  • Uses MQTT publish to set/clear PIN codes via zigbee2mqtt/{friendly_name}/set
  • Subscribes to device topic for push updates
  • Polls via MQTT get requests with async response handling

Maps to the "mqtt" domain in INTEGRATIONS_CLASS_MAP since Zigbee2MQTT devices appear as MQTT entities in Home Assistant.

Also adds "mqtt" to after_dependencies in manifest.

Type of change

  • New feature (which adds functionality)

Additional information

  • This PR is related to issue: Adding support for additional lock integrations

🤖 Generated with Claude Code

@github-actions github-actions bot added the python Pull requests that update Python code label Jan 5, 2026
@codecov
Copy link

codecov bot commented Jan 5, 2026

Codecov Report

❌ Patch coverage is 21.49533% with 168 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.28%. Comparing base (059c578) to head (53f4146).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...ponents/lock_code_manager/providers/zigbee2mqtt.py 21.12% 168 Missing ⚠️

❌ Your patch check has failed because the patch coverage (21.49%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #740      +/-   ##
==========================================
- Coverage   96.04%   90.28%   -5.77%     
==========================================
  Files          29       30       +1     
  Lines        2554     2768     +214     
  Branches       83       83              
==========================================
+ Hits         2453     2499      +46     
- Misses        101      269     +168     
Flag Coverage Δ
python 89.72% <21.49%> (-6.28%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...components/lock_code_manager/providers/__init__.py 100.00% <100.00%> (ø)
...ponents/lock_code_manager/providers/zigbee2mqtt.py 21.12% <21.12%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

raman325 and others added 5 commits January 20, 2026 00:22
Add support for Zigbee2MQTT locks by publishing/subscribing to MQTT topics.
This enables user code management for locks exposed via Zigbee2MQTT:
- Detects Zigbee2MQTT devices by their device identifiers (zigbee2mqtt_*)
- Uses MQTT publish to set/clear PIN codes
- Subscribes to device topic for push updates
- Polls via MQTT get requests with async response handling

Maps to the "mqtt" domain in INTEGRATIONS_CLASS_MAP since Zigbee2MQTT
devices appear as MQTT entities in Home Assistant.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
…n checks (#794)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants