Skip to content

Remove Frient EMI Norwegian HAN divisor workaround#4750

Draft
TheJulianJES wants to merge 9 commits intozigpy:devfrom
TheJulianJES:tjj/remove_frient_emi_divisor_workaround
Draft

Remove Frient EMI Norwegian HAN divisor workaround#4750
TheJulianJES wants to merge 9 commits intozigpy:devfrom
TheJulianJES:tjj/remove_frient_emi_divisor_workaround

Conversation

@TheJulianJES
Copy link
Collaborator

@TheJulianJES TheJulianJES commented Feb 12, 2026

Proposed change

This removes the workaround for the Frient EMI Norwegian HAN, which previously blocked attribute reports for the divisor attribute, similar to Z2M here. With HA Core 2026.2.0 and later, this should no longer be needed.

The Frient EMI HAN test was also changed to use a message from a real device (with the mfr-specific bit set).

Additional information

This essentially reverts the following PR:

There's more context in the comments of that PR. @uvNikita was able to grab such an attribute report for the manufacturer specific attribute that conflicts with the ZCL divisor attribute and we confirmed the is_manufacturer_specific bit is correctly set, meaning that zigpy no longer parses those attribute reports for the ZCL attribute. (Thanks!!)

  • In a future PR, we can implement support for the Frient specific attributes.
  • The "quirk" (temporarily without function) was kept, as we still have a test for this device and plan to add more functionality to it soon.
  • We should only merge this for HA Core 2026.3.x.

Device diagnostics

See this comment: #4396 (comment)

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

@TheJulianJES
Copy link
Collaborator Author

This also removes the _CONSTANT_ATTRIBUTES workaround to set the divisor to a fixed 1000. We should make sure that when reading the attribute (with this modified empty quirk), the device actually returns 1000.

@TheJulianJES
Copy link
Collaborator Author

Hmm, looks like zigpy is still parsing the attribute report for the divisor, even though it has a manufacturer code set? Need to check this later.

@puddly
Copy link
Contributor

puddly commented Feb 12, 2026

We will still emit an attribute report event if an attribute definition doesn't exist, for backwards compatibility.

@TheJulianJES
Copy link
Collaborator Author

TheJulianJES commented Feb 12, 2026

Ah, right. A bunch of things in zigpy/quirks still rely on the IDs anyway (ClusterListener, _CONSTANT_ATTRIBUTES). Those need to allow definition reference (or name) for this.

For reference, also left a comment about this here: zigpy/zigpy#1760 (comment)

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