mirror of
https://github.com/home-assistant/core
synced 2024-10-05 09:12:11 +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",
|
||||
"ssid",
|
||||
"id",
|
||||
"mac",
|
||||
"macAddress",
|
||||
"parentDeviceUid",
|
||||
"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.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)
|
||||
|
|
Loading…
Reference in a new issue