Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for DIAGNOSTIC WriteAttributeButton entities #308

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

jeverley
Copy link
Contributor

Addresses the bug #291 where v2 quirks can't create WriteAttributeButton entities with a DIAGNOSTIC EntityType.

This change adds the required mapping to QUIRKS_ENTITY_META_TO_ENTITY_CLASS in discovery.py

@dmulcahey
Copy link
Contributor

Just curious, what’s the use case here?

Copy link

codecov bot commented Nov 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.33%. Comparing base (d30149c) to head (bab557c).
Report is 3 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #308   +/-   ##
=======================================
  Coverage   96.33%   96.33%           
=======================================
  Files          61       61           
  Lines        9388     9388           
=======================================
  Hits         9044     9044           
  Misses        344      344           

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


🚨 Try these New Features:

@jeverley
Copy link
Contributor Author

Just curious, what’s the use case here?

Probably fairly niche, but some Aqara devices allow the user to trigger the device to restart (example below from my FP1E quirk):

image

This feels to me more like a diagnostic function (like Identify) rather than configuration.

@puddly puddly requested a review from Copilot November 25, 2024 18:18

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no suggestions.

@dmulcahey dmulcahey merged commit 21d8779 into zigpy:dev Nov 25, 2024
9 checks passed
jeverley added a commit to jeverley/zha-device-handlers that referenced this pull request Nov 25, 2024
UnitOfLength.METERS for distance entities (zigpy/zha#307)

EntityType.DIAGNOSTIC for restart device button (zigpy/zha#308)
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