Skip to content

Commit

Permalink
Obfuscate PVI and Battery serials
Browse files Browse the repository at this point in the history
  • Loading branch information
torbennehmer committed Jul 30, 2023
1 parent 22f6a8b commit 0df7bcc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion custom_components/e3dc_rscp/diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ async def async_get_config_entry_diagnostics(
] = f"{result['get_system_info']['serial'][:3]}<redacted>"

for pvi in result["get_pvis_data"]:
pvi["serialNumber"] = f"{pvi["serialNumber"][:3]}<redacted>"
pvi["serialNumber"] = f"{pvi['serialNumber'][:3]}<redacted>"

for bat in result["get_batteries_data"]:
for dcb in bat["dcbs"]:
dcb["serialCode"] = f"{dcb['serialCode'][:3]}<redacted>"

return result

0 comments on commit 0df7bcc

Please sign in to comment.