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:
G Johansson 2024-01-14 15:34:14 +01:00 committed by GitHub
parent d94421e1a4
commit 7a6dca0987
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 1438 additions and 0 deletions

View file

@ -14,6 +14,7 @@ TO_REDACT = {
"location",
"ssid",
"id",
"mac",
"macAddress",
"parentDeviceUid",
"qrId",

File diff suppressed because it is too large Load diff

View file

@ -9,6 +9,8 @@ from homeassistant.core import HomeAssistant
from tests.components.diagnostics import get_diagnostics_for_config_entry
from tests.typing import ClientSessionGenerator
EXCLUDE_ATTRIBUTES = {"full_features"}
async def test_diagnostics(
hass: HomeAssistant,
@ -28,3 +30,9 @@ async def test_diagnostics(
assert diag["ABC999111"]["smart_low_state"] == snapshot
assert diag["ABC999111"]["smart_high_state"] == 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)