Skip to content

Commit

Permalink
Add OpenVPN connected_clients and improve Wireguard attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
Snuffy2 committed Oct 24, 2024
1 parent 1f097ed commit c559bae
Show file tree
Hide file tree
Showing 4 changed files with 182 additions and 141 deletions.
5 changes: 4 additions & 1 deletion custom_components/opnsense/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,10 @@ async def _async_update_data(self) -> Mapping[str, Any]:
interface[new_property] = value

for vpn_type in ["openvpn", "wireguard"]:
for clients_servers in ["clients", "servers"]:
cs = ["servers"]
if vpn_type == "wireguard":
cs = ["clients", "servers"]
for clients_servers in cs:
for instance_name in dict_get(
self._state, f"{vpn_type}.{clients_servers}", {}
):
Expand Down
Loading

0 comments on commit c559bae

Please sign in to comment.