Skip to content

Commit

Permalink
Merge pull request #154 from dougiteixeira/redact-host-diagnostic
Browse files Browse the repository at this point in the history
Redact host information in diagnostic file
  • Loading branch information
dougiteixeira authored Nov 10, 2023
2 parents 5442587 + 645cd3c commit 2454ff4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions custom_components/proxmoxve/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b
coordinator_node = ProxmoxNodeCoordinator(
hass=hass,
proxmox=proxmox,
host_name=config_entry.data[CONF_HOST],
api_category=ProxmoxType.Node,
node_name=node,
)
await coordinator_node.async_refresh()
Expand Down Expand Up @@ -365,7 +365,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b
coordinator_qemu = ProxmoxQEMUCoordinator(
hass=hass,
proxmox=proxmox,
host_name=config_entry.data[CONF_HOST],
api_category=ProxmoxType.QEMU,
qemu_id=vm_id,
)
await coordinator_qemu.async_refresh()
Expand Down Expand Up @@ -401,7 +401,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b
coordinator_lxc = ProxmoxLXCCoordinator(
hass=hass,
proxmox=proxmox,
host_name=config_entry.data[CONF_HOST],
api_category=ProxmoxType.LXC,
container_id=container_id,
)
await coordinator_lxc.async_refresh()
Expand Down
12 changes: 6 additions & 6 deletions custom_components/proxmoxve/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ def __init__(
self,
hass: HomeAssistant,
proxmox: ProxmoxAPI,
host_name: str,
api_category: str,
node_name: str,
) -> None:
"""Initialize the Proxmox Node coordinator."""

super().__init__(
hass,
LOGGER,
name=f"proxmox_coordinator_{host_name}_{node_name}",
name=f"proxmox_coordinator_{api_category}_{node_name}",
update_interval=timedelta(seconds=UPDATE_INTERVAL),
)

Expand Down Expand Up @@ -137,15 +137,15 @@ def __init__(
self,
hass: HomeAssistant,
proxmox: ProxmoxAPI,
host_name: str,
api_category: str,
qemu_id: int,
) -> None:
"""Initialize the Proxmox QEMU coordinator."""

super().__init__(
hass,
LOGGER,
name=f"proxmox_coordinator_{host_name}_{qemu_id}",
name=f"proxmox_coordinator_{api_category}_{qemu_id}",
update_interval=timedelta(seconds=UPDATE_INTERVAL),
)

Expand Down Expand Up @@ -245,15 +245,15 @@ def __init__(
self,
hass: HomeAssistant,
proxmox: ProxmoxAPI,
host_name: str,
api_category: str,
container_id: int,
) -> None:
"""Initialize the Proxmox LXC coordinator."""

super().__init__(
hass,
LOGGER,
name=f"proxmox_coordinator_{host_name}_{container_id}",
name=f"proxmox_coordinator_{api_category}_{container_id}",
update_interval=timedelta(seconds=UPDATE_INTERVAL),
)

Expand Down
2 changes: 1 addition & 1 deletion custom_components/proxmoxve/diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

TO_REDACT_API = []

TO_REDACT_DATA = []
TO_REDACT_DATA = ["configuration_url"]


async def async_get_config_entry_diagnostics(
Expand Down
2 changes: 1 addition & 1 deletion custom_components/proxmoxve/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"issue_tracker": "https://github.com/dougiteixeira/proxmoxve/issues",
"loggers": ["proxmoxer"],
"requirements": ["proxmoxer==2.0.1"],
"version": "2.1.0"
"version": "2.1.1"
}

0 comments on commit 2454ff4

Please sign in to comment.