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

Hotfix diagnostic data export - #1469 #1526

Merged
merged 1 commit into from
Jan 3, 2025

Conversation

folfy
Copy link
Collaborator

@folfy folfy commented Dec 19, 2024

Motivation:

Fix #1469

The issue was introduced in #1371, where in _load_adapter the import was changed to use async_import_module instead, which needs hass as an object (which wasn't required/used before). All other calls to load_adapter pass "self" als the first object, while only diagnostic.py calls it with hass as the first object -> Therefore getting self.hass in load_adapter fails, since self = hass already

Changes:

Idk what the original intention of calling load_adapter with "get_name=True" in diagnostic.py was, but in the current version it does nothing more but return trv_id["integration"], which is already stored in "bt_integration" (no need to call load_adapter for this).
-> I commented out the problematic code for now, since it wouldn't provide any additional atm anyway. At least the diagostic export won't be completely broken anymore.
I'm sure this used to do something more useful in the past, but to properly fix the "bt_adapter" output, I need to figure out first when what it was supposed to actually contain.

Related issue (check one):

Checklist (check one):

  • I did not change any code (e.g. documentation changes)
  • The code change is tested and works locally.

Test-Hardware list (for code changes)

HA Version: 2024.12.1
Zigbee2MQTT Version: N/A
TRV Hardware: Demo

@folfy
Copy link
Collaborator Author

folfy commented Dec 19, 2024

This would be rather important, since it's currently blocking everyone from exporting diagnostic data (since v1.6.1 already), and making our life hard in regards to analyzing any of the newer issues 😐

@RubenKelevra - Please have a look
@KartoffelToby - Please merge asap

@KartoffelToby
Copy link
Owner

@folfy thx for debbuging, i looking into it, the adapter must be valid, i'll check it

@KartoffelToby KartoffelToby merged commit 134ef77 into KartoffelToby:master Jan 3, 2025
3 checks passed
@folfy folfy deleted the bugfix/diagnostics branch January 8, 2025 23:43
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.

Can't generate diagnose data
2 participants