mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Convert dataclass to dict in pyLoad diagnostics (#120552)
This commit is contained in:
parent
a36c40a434
commit
13a9efb6a6
@ -2,6 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import asdict
|
||||
from typing import Any
|
||||
|
||||
from homeassistant.components.diagnostics import async_redact_data
|
||||
@ -22,5 +23,5 @@ async def async_get_config_entry_diagnostics(
|
||||
|
||||
return {
|
||||
"config_entry_data": async_redact_data(dict(config_entry.data), TO_REDACT),
|
||||
"pyload_data": pyload_data,
|
||||
"pyload_data": asdict(pyload_data),
|
||||
}
|
||||
|
@ -10,8 +10,15 @@
|
||||
'verify_ssl': False,
|
||||
}),
|
||||
'pyload_data': dict({
|
||||
'__type': "<class 'homeassistant.components.pyload.coordinator.pyLoadData'>",
|
||||
'repr': 'pyLoadData(pause=False, active=1, queue=6, total=37, speed=5405963.0, download=True, reconnect=False, captcha=False, free_space=99999999999)',
|
||||
'active': 1,
|
||||
'captcha': False,
|
||||
'download': True,
|
||||
'free_space': 99999999999,
|
||||
'pause': False,
|
||||
'queue': 6,
|
||||
'reconnect': False,
|
||||
'speed': 5405963.0,
|
||||
'total': 37,
|
||||
}),
|
||||
})
|
||||
# ---
|
||||
|
Loading…
x
Reference in New Issue
Block a user