mirror of
https://github.com/home-assistant/core.git
synced 2026-08-08 14:25:42 +01:00
homee: Redact additional data for diagnostics (#177233)
This commit is contained in:
@@ -3,13 +3,30 @@
|
||||
from typing import Any
|
||||
|
||||
from homeassistant.components.diagnostics import async_redact_data
|
||||
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
|
||||
from homeassistant.const import (
|
||||
CONF_ADDRESS,
|
||||
CONF_LATITUDE,
|
||||
CONF_LONGITUDE,
|
||||
CONF_PASSWORD,
|
||||
CONF_USERNAME,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.device_registry import DeviceEntry
|
||||
|
||||
from . import DOMAIN, HomeeConfigEntry
|
||||
|
||||
TO_REDACT = [CONF_PASSWORD, CONF_USERNAME, "latitude", "longitude", "wlan_ssid"]
|
||||
TO_REDACT = [
|
||||
CONF_ADDRESS,
|
||||
CONF_LATITUDE,
|
||||
CONF_LONGITUDE,
|
||||
CONF_PASSWORD,
|
||||
CONF_USERNAME,
|
||||
"available_ssids",
|
||||
"city",
|
||||
"webhooks_key",
|
||||
"wlan_ssid",
|
||||
"zip",
|
||||
]
|
||||
|
||||
|
||||
async def async_get_config_entry_diagnostics(
|
||||
|
||||
@@ -80,6 +80,11 @@ def mock_homee() -> Generator[AsyncMock]:
|
||||
"wlan_ssid": "TestSSID",
|
||||
"latitude": 52.5200,
|
||||
"longitude": 13.4050,
|
||||
"address": "Test address",
|
||||
"zip": "10115",
|
||||
"city": "Berlin",
|
||||
"available_ssids": ["TestSSID", "OtherSSID"],
|
||||
"webhooks_key": "test_webhooks_key",
|
||||
}
|
||||
|
||||
yield homee
|
||||
|
||||
@@ -765,13 +765,18 @@
|
||||
'username': '**REDACTED**',
|
||||
}),
|
||||
'settings': dict({
|
||||
'address': '**REDACTED**',
|
||||
'available_ssids': '**REDACTED**',
|
||||
'city': '**REDACTED**',
|
||||
'homee_name': 'TestHomee',
|
||||
'latitude': '**REDACTED**',
|
||||
'longitude': '**REDACTED**',
|
||||
'mac_address': '00:05:55:11:ee:cc',
|
||||
'uid': '00055511EECC',
|
||||
'version': '1.2.3',
|
||||
'webhooks_key': '**REDACTED**',
|
||||
'wlan_ssid': '**REDACTED**',
|
||||
'zip': '**REDACTED**',
|
||||
}),
|
||||
})
|
||||
# ---
|
||||
|
||||
Reference in New Issue
Block a user