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

Consolidate device diagnostics and create a tool to regenerate them #284

Draft
wants to merge 18 commits into
base: dev
Choose a base branch
from

Conversation

puddly
Copy link
Contributor

@puddly puddly commented Oct 31, 2024

Combines the logic from HA Core, this library, and https://github.com/dmulcahey/zha-device-exporter/ into a single method: Device.get_diagnostics_json().

@puddly puddly force-pushed the puddly/combined-diagnostics branch from 9e2c905 to 664951c Compare October 31, 2024 20:45
@puddly
Copy link
Contributor Author

puddly commented Oct 31, 2024

Everything works but with a small problem: clusters that modify the state (e.g. double battery percentage) modify it globally, so running the tool keeps doubling them after re-load. We'll need to restore entity state after loading device info, it seems.


Fixed with 9f4fe5b.

Copy link

codecov bot commented Nov 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.35%. Comparing base (69abf69) to head (667ee55).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #284      +/-   ##
==========================================
+ Coverage   96.33%   96.35%   +0.02%     
==========================================
  Files          61       61              
  Lines        9388     9448      +60     
==========================================
+ Hits         9044     9104      +60     
  Misses        344      344              

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

tests/test_discover.py Outdated Show resolved Hide resolved
zha/zigbee/device.py Outdated Show resolved Hide resolved
tests/common.py Outdated Show resolved Hide resolved
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