From 0df7bcc2b21910ce17755f0980fc4c1e5deba643 Mon Sep 17 00:00:00 2001 From: Torben Nehmer Date: Sun, 30 Jul 2023 18:04:11 +0000 Subject: [PATCH] Obfuscate PVI and Battery serials --- custom_components/e3dc_rscp/diagnostics.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/custom_components/e3dc_rscp/diagnostics.py b/custom_components/e3dc_rscp/diagnostics.py index 42059e0..6a038e6 100644 --- a/custom_components/e3dc_rscp/diagnostics.py +++ b/custom_components/e3dc_rscp/diagnostics.py @@ -61,6 +61,10 @@ async def async_get_config_entry_diagnostics( ] = f"{result['get_system_info']['serial'][:3]}" for pvi in result["get_pvis_data"]: - pvi["serialNumber"] = f"{pvi["serialNumber"][:3]}" + pvi["serialNumber"] = f"{pvi['serialNumber'][:3]}" + + for bat in result["get_batteries_data"]: + for dcb in bat["dcbs"]: + dcb["serialCode"] = f"{dcb['serialCode'][:3]}" return result