mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Sensibo include mac in diagnostics redact filter (#107986)
* Add mac to redaction in Sensibo diagnostics * Add full snapshot * use constant
This commit is contained in:
parent
d94421e1a4
commit
7a6dca0987
@ -14,6 +14,7 @@ TO_REDACT = {
|
|||||||
"location",
|
"location",
|
||||||
"ssid",
|
"ssid",
|
||||||
"id",
|
"id",
|
||||||
|
"mac",
|
||||||
"macAddress",
|
"macAddress",
|
||||||
"parentDeviceUid",
|
"parentDeviceUid",
|
||||||
"qrId",
|
"qrId",
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -9,6 +9,8 @@ from homeassistant.core import HomeAssistant
|
|||||||
from tests.components.diagnostics import get_diagnostics_for_config_entry
|
from tests.components.diagnostics import get_diagnostics_for_config_entry
|
||||||
from tests.typing import ClientSessionGenerator
|
from tests.typing import ClientSessionGenerator
|
||||||
|
|
||||||
|
EXCLUDE_ATTRIBUTES = {"full_features"}
|
||||||
|
|
||||||
|
|
||||||
async def test_diagnostics(
|
async def test_diagnostics(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
@ -28,3 +30,9 @@ async def test_diagnostics(
|
|||||||
assert diag["ABC999111"]["smart_low_state"] == snapshot
|
assert diag["ABC999111"]["smart_low_state"] == snapshot
|
||||||
assert diag["ABC999111"]["smart_high_state"] == snapshot
|
assert diag["ABC999111"]["smart_high_state"] == snapshot
|
||||||
assert diag["ABC999111"]["pure_conf"] == snapshot
|
assert diag["ABC999111"]["pure_conf"] == snapshot
|
||||||
|
|
||||||
|
def limit_attrs(prop, path):
|
||||||
|
exclude_attrs = EXCLUDE_ATTRIBUTES
|
||||||
|
return prop in exclude_attrs
|
||||||
|
|
||||||
|
assert diag == snapshot(name="full_snapshot", exclude=limit_attrs)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user