Skip to content

Conversation

@TheJulianJES
Copy link
Collaborator

@TheJulianJES TheJulianJES commented Nov 12, 2025

Proposed change

This exposes the Frient manufacturer-specific current_summation attribute.
A write attribute button is also added to easily reset this to 0. This is what the user will see.

Additional information

There will be no number entity to change the value, as the attribute is write-only and we'd duplicate some functionality we have in the sensor.

Advanced users can still set the current_summation to a value they want via the debug UI or a service action call.

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

@codecov
Copy link

codecov bot commented Nov 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.26%. Comparing base (928268c) to head (86e9500).
⚠️ Report is 6 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #4484      +/-   ##
==========================================
+ Coverage   92.24%   92.26%   +0.01%     
==========================================
  Files         369      371       +2     
  Lines       12094    12119      +25     
==========================================
+ Hits        11156    11181      +25     
  Misses        938      938              

☔ 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.

@TheJulianJES TheJulianJES changed the title Expose Frient EMI LED current_summation write-only attribute Expose Frient EMI LED reset current summation button Nov 12, 2025
Copy link
Collaborator Author

@TheJulianJES TheJulianJES left a comment

Choose a reason for hiding this comment

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

Works as expected. As mentioned, users can manually write the current_summation field via the "Manage Zigbee device" UI or with service calls. Most users shouldn't need to do this, however. For them, there's the simple "Reset summation delivered" button.

@TheJulianJES TheJulianJES marked this pull request as ready for review November 25, 2025 23:38
@TheJulianJES TheJulianJES merged commit e43aa43 into zigpy:dev Nov 25, 2025
7 checks passed
@TheJulianJES TheJulianJES deleted the tjj/frient_emi_led_reset_energy_button branch November 25, 2025 23:40
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.

1 participant