Skip to content
Snippets Groups Projects
Unverified Commit 7a6dca09 authored by G Johansson's avatar G Johansson Committed by GitHub
Browse files

Sensibo include mac in diagnostics redact filter (#107986)

* Add mac to redaction in Sensibo diagnostics

* Add full snapshot

* use constant
parent d94421e1
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,7 @@ TO_REDACT = {
"location",
"ssid",
"id",
"mac",
"macAddress",
"parentDeviceUid",
"qrId",
......
This diff is collapsed.
......@@ -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)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment