mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 04:37:06 +00:00
Clean up post-merge review comments (#64842)
* Clean up post-merge diagnostics PRs * Trigger Build * Linting
This commit is contained in:
parent
5622e45980
commit
3a978fc244
@ -23,14 +23,10 @@ async def async_get_config_entry_diagnostics(
|
||||
"""Return diagnostics for a config entry."""
|
||||
coordinators: dict[str, DataUpdateCoordinator] = hass.data[DOMAIN][entry.entry_id]
|
||||
|
||||
return {
|
||||
"data": {
|
||||
CATEGORY_CDC_REPORT: async_redact_data(
|
||||
coordinators[CATEGORY_CDC_REPORT].data, TO_REDACT
|
||||
),
|
||||
CATEGORY_USER_REPORT: [
|
||||
async_redact_data(report, TO_REDACT)
|
||||
for report in coordinators[CATEGORY_USER_REPORT].data
|
||||
],
|
||||
return async_redact_data(
|
||||
{
|
||||
CATEGORY_CDC_REPORT: coordinators[CATEGORY_CDC_REPORT].data,
|
||||
CATEGORY_USER_REPORT: coordinators[CATEGORY_USER_REPORT].data,
|
||||
},
|
||||
}
|
||||
TO_REDACT,
|
||||
)
|
||||
|
@ -27,6 +27,4 @@ async def async_get_config_entry_diagnostics(
|
||||
"""Return diagnostics for a config entry."""
|
||||
coordinator: DataUpdateCoordinator = hass.data[DOMAIN][entry.entry_id]
|
||||
|
||||
return {
|
||||
"data": async_redact_data(coordinator.data, TO_REDACT),
|
||||
}
|
||||
return async_redact_data(coordinator.data, TO_REDACT)
|
||||
|
@ -7,7 +7,6 @@ from tests.components.diagnostics import get_diagnostics_for_config_entry
|
||||
async def test_entry_diagnostics(hass, config_entry, hass_client, setup_flunearyou):
|
||||
"""Test config entry diagnostics."""
|
||||
assert await get_diagnostics_for_config_entry(hass, hass_client, config_entry) == {
|
||||
"data": {
|
||||
"cdc_report": {
|
||||
"level": "Low",
|
||||
"level2": "None",
|
||||
@ -65,5 +64,4 @@ async def test_entry_diagnostics(hass, config_entry, hass_client, setup_fluneary
|
||||
"icon": "1",
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
|
@ -7,7 +7,6 @@ from tests.components.diagnostics import get_diagnostics_for_config_entry
|
||||
async def test_entry_diagnostics(hass, config_entry, hass_client, setup_notion):
|
||||
"""Test config entry diagnostics."""
|
||||
assert await get_diagnostics_for_config_entry(hass, hass_client, config_entry) == {
|
||||
"data": {
|
||||
"bridges": {
|
||||
"12345": {
|
||||
"id": 12345,
|
||||
@ -109,5 +108,4 @@ async def test_entry_diagnostics(hass, config_entry, hass_client, setup_notion):
|
||||
"links": {"sensor": 525993},
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user