mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +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."""
|
"""Return diagnostics for a config entry."""
|
||||||
coordinators: dict[str, DataUpdateCoordinator] = hass.data[DOMAIN][entry.entry_id]
|
coordinators: dict[str, DataUpdateCoordinator] = hass.data[DOMAIN][entry.entry_id]
|
||||||
|
|
||||||
return {
|
return async_redact_data(
|
||||||
"data": {
|
{
|
||||||
CATEGORY_CDC_REPORT: async_redact_data(
|
CATEGORY_CDC_REPORT: coordinators[CATEGORY_CDC_REPORT].data,
|
||||||
coordinators[CATEGORY_CDC_REPORT].data, TO_REDACT
|
CATEGORY_USER_REPORT: coordinators[CATEGORY_USER_REPORT].data,
|
||||||
),
|
|
||||||
CATEGORY_USER_REPORT: [
|
|
||||||
async_redact_data(report, TO_REDACT)
|
|
||||||
for report in coordinators[CATEGORY_USER_REPORT].data
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
}
|
TO_REDACT,
|
||||||
|
)
|
||||||
|
@ -27,6 +27,4 @@ async def async_get_config_entry_diagnostics(
|
|||||||
"""Return diagnostics for a config entry."""
|
"""Return diagnostics for a config entry."""
|
||||||
coordinator: DataUpdateCoordinator = hass.data[DOMAIN][entry.entry_id]
|
coordinator: DataUpdateCoordinator = hass.data[DOMAIN][entry.entry_id]
|
||||||
|
|
||||||
return {
|
return async_redact_data(coordinator.data, TO_REDACT)
|
||||||
"data": 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):
|
async def test_entry_diagnostics(hass, config_entry, hass_client, setup_flunearyou):
|
||||||
"""Test config entry diagnostics."""
|
"""Test config entry diagnostics."""
|
||||||
assert await get_diagnostics_for_config_entry(hass, hass_client, config_entry) == {
|
assert await get_diagnostics_for_config_entry(hass, hass_client, config_entry) == {
|
||||||
"data": {
|
|
||||||
"cdc_report": {
|
"cdc_report": {
|
||||||
"level": "Low",
|
"level": "Low",
|
||||||
"level2": "None",
|
"level2": "None",
|
||||||
@ -65,5 +64,4 @@ async def test_entry_diagnostics(hass, config_entry, hass_client, setup_fluneary
|
|||||||
"icon": "1",
|
"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):
|
async def test_entry_diagnostics(hass, config_entry, hass_client, setup_notion):
|
||||||
"""Test config entry diagnostics."""
|
"""Test config entry diagnostics."""
|
||||||
assert await get_diagnostics_for_config_entry(hass, hass_client, config_entry) == {
|
assert await get_diagnostics_for_config_entry(hass, hass_client, config_entry) == {
|
||||||
"data": {
|
|
||||||
"bridges": {
|
"bridges": {
|
||||||
"12345": {
|
"12345": {
|
||||||
"id": 12345,
|
"id": 12345,
|
||||||
@ -109,5 +108,4 @@ async def test_entry_diagnostics(hass, config_entry, hass_client, setup_notion):
|
|||||||
"links": {"sensor": 525993},
|
"links": {"sensor": 525993},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user