From 96694878fbedd3345739d8d2ebe70533042406ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Wed, 20 Mar 2024 08:23:16 +0100 Subject: [PATCH] Redact the area of traccar server geofences (#113861) --- homeassistant/components/traccar_server/diagnostics.py | 7 ++++++- .../traccar_server/snapshots/test_diagnostics.ambr | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/traccar_server/diagnostics.py b/homeassistant/components/traccar_server/diagnostics.py index a6ad6084daf..8e9e6490e44 100644 --- a/homeassistant/components/traccar_server/diagnostics.py +++ b/homeassistant/components/traccar_server/diagnostics.py @@ -13,7 +13,12 @@ from homeassistant.helpers import device_registry as dr, entity_registry as er from .const import DOMAIN from .coordinator import TraccarServerCoordinator -TO_REDACT = {CONF_ADDRESS, CONF_LATITUDE, CONF_LONGITUDE} +TO_REDACT = { + CONF_ADDRESS, + CONF_LATITUDE, + CONF_LONGITUDE, + "area", # This is the polygon area of a geofence +} async def async_get_config_entry_diagnostics( diff --git a/tests/components/traccar_server/snapshots/test_diagnostics.ambr b/tests/components/traccar_server/snapshots/test_diagnostics.ambr index 1726f1c3d45..20d01e427ea 100644 --- a/tests/components/traccar_server/snapshots/test_diagnostics.ambr +++ b/tests/components/traccar_server/snapshots/test_diagnostics.ambr @@ -34,7 +34,7 @@ 'uniqueId': 'abc123', }), 'geofence': dict({ - 'area': 'string', + 'area': '**REDACTED**', 'attributes': dict({ }), 'calendarId': 0, @@ -134,7 +134,7 @@ 'uniqueId': 'abc123', }), 'geofence': dict({ - 'area': 'string', + 'area': '**REDACTED**', 'attributes': dict({ }), 'calendarId': 0,