Skip to content

Conversation

MAFL74
Copy link

@MAFL74 MAFL74 commented Jul 14, 2025

Proposed change

Add custom ZHA quirk for Namron 4512772 8-button Zigbee switch.

  • Enables full support for all 8 channels with short press, long hold (for dimming), and long release (for stopping dimming).
  • Exposes all endpoints as channels (channel_1 to channel_8).
  • This quirk is tested with Home Assistant ZHA and works together with the included Home Assistant automation blueprint.

Additional information

  • Device model: Namron 4512772 (8-button Zigbee switch)
  • Manufacturer: NAMRON AS
  • The quirk exposes all button events in a way that is easy to use with Home Assistant automations/blueprints.
  • The blueprint enables any user to configure all short/long press actions for each channel.
  • Tested and confirmed working in Home Assistant 2024.7.x (July release).
  • Full README and blueprint are available at: https://github.com/MAFL74/namron_4512772_zha

Checklist

  • The changes are tested and work correctly
  • pre-commit checks pass / the code has been formatted using Black
  • Tests have been added to verify that the new code works

Copy link
Author

@MAFL74 MAFL74 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated code to address ruff/PEP8 feedback from CI.

  • Added docstrings
  • Fixed imports and punctuation
  • Reformatted for compliance

MAFL74 and others added 2 commits July 14, 2025 14:08
Updated code to address ruff/PEP8 feedback from CI.  
- Added docstrings  
- Fixed imports and punctuation  
- Reformatted for compliance
Copy link
Author

@MAFL74 MAFL74 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated code to address ruff/PEP8 feedback from CI.

  • Added docstrings
  • Fixed imports and punctuation
  • Reformatted for compliance

Copy link

codecov bot commented Jul 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.30%. Comparing base (a24ba30) to head (abf2b65).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #4185   +/-   ##
=======================================
  Coverage   91.30%   91.30%           
=======================================
  Files         340      342    +2     
  Lines       10993    11001    +8     
=======================================
+ Hits        10037    10045    +8     
  Misses        956      956           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@puddly
Copy link
Contributor

puddly commented Jul 30, 2025

Thanks for the PR! We're migrating all new quirks to the much-simplified v2 interface. Since your quirk just adds automation triggers, you can use this very similar quirk as a template and strip off all of the matching code present in this v1 quirk: https://github.com/zigpy/zha-device-handlers/blob/be5f15c312e2243529810803f032debde2b58ae6/zhaquirks/legrand/wirelessswitch.py

@TheJulianJES TheJulianJES added the needs reviewer answer An answer from a reviewer is needed (e.g. why a PR isn't acceptable in the current state). label Aug 24, 2025
@TheJulianJES TheJulianJES changed the title Add quirk: Namron 4512772 8-button Zigbee switch (full ZHA support) Add Namron 4512772 8-button Zigbee switch Aug 24, 2025
@TheJulianJES TheJulianJES changed the title Add Namron 4512772 8-button Zigbee switch Add Namron 4512772 8-button Zigbee remote Aug 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs reviewer answer An answer from a reviewer is needed (e.g. why a PR isn't acceptable in the current state).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants