Hotfix diagnostic data export - #1469 #1526
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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):
Test-Hardware list (for code changes)
HA Version: 2024.12.1
Zigbee2MQTT Version: N/A
TRV Hardware: Demo