Skip to content

Add Namron 4512783 thermostat quirk - #5288

Open
magnusoverli wants to merge 1 commit into
zigpy:devfrom
magnusoverli:namron-4512783-thermostat-controls
Open

Add Namron 4512783 thermostat quirk#5288
magnusoverli wants to merge 1 commit into
zigpy:devfrom
magnusoverli:namron-4512783-thermostat-controls

Conversation

@magnusoverli

Copy link
Copy Markdown

Proposed change

Add a V2 quirk for the Namron 4512783 floor-heating thermostat.

The quirk defines the verified private Thermostat cluster attributes and exposes controls or status entities for:

  • Window-open detection and state
  • Anti-frost protection
  • Weekly schedule type
  • Thermostat sensor and regulator modes
  • Panel brightness and screen-on time
  • Fault flags
  • Regulator cycle and output percentage
  • Holiday and maximum heat temperatures
  • Vacation status
  • Automatic time
  • Metric or imperial temperature display

The private attributes are read at startup because the device does not reliably report them. Hardware reads and writes confirmed that these attributes use standard ZCL framing, so their definitions explicitly suppress manufacturer-specific framing with manufacturer_code=None.

This supersedes #4576, which was closed without merging. Ambiguous or unverified fields from that earlier implementation, including cluster 0xE002, are deliberately excluded.

Additional information

  • Tested on a physical Namron 4512783 running firmware build 1.13.
  • Hardware testing confirmed raw sensor mode 0x06 selects regulator mode.
  • Hardware testing confirmed screen-on-time raw value 0x02 means 30 seconds.
  • Temperature scaling is covered for the hundredths-of-a-degree holiday value and tenths-of-a-degree maximum heat value.
  • Tests verify entity creation, enum options, startup reads, scaling, wire types, and standard non-manufacturer ZCL framing.
  • Full test suite: 4843 passed, 2 xfailed.
  • All pre-commit hooks pass.

Device diagnostics

Redacted Home Assistant ZHA device diagnostics

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
  • Device diagnostics data has been attached

Copilot AI lite review requested due to automatic review settings August 28, 2026 10:12
@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.92%. Comparing base (6a3822c) to head (9bf8108).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #5288      +/-   ##
==========================================
+ Coverage   92.60%   92.92%   +0.31%     
==========================================
  Files         424      425       +1     
  Lines       14667    14708      +41     
==========================================
+ Hits        13582    13667      +85     
+ Misses       1085     1041      -44     

☔ View full report in Codecov by Harness.
📢 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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds first-party support for the Namron 4512783 floor-heating thermostat by introducing a V2 quirk that replaces the standard Thermostat cluster with a custom cluster defining the device’s verified private attributes (explicitly using standard/non-manufacturer ZCL framing via manufacturer_code=None). The PR also adds a dedicated test suite validating entity discovery, enum options, startup reads, value scaling, and write framing.

Changes:

  • Added NamronThermostatCluster with private Thermostat attributes and a QuirkBuilder definition exposing the intended switches/sensors/enums/numbers.
  • Added zhaquirks.namron package initializer to ensure module discovery/import.
  • Added tests covering entity creation, startup read behavior, scaling, and non-manufacturer ZCL write framing.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
zhaquirks/namron/namron_4512783.py New V2 quirk and custom Thermostat cluster defining private attributes and exposed entities for the Namron 4512783.
zhaquirks/namron/__init__.py Introduces the Namron package marker for module discovery.
tests/test_namron.py Adds coverage for entity discovery/config, enum options, scaling, startup reads, and standard (non-manufacturer-specific) write framing.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants