Skip to content

Commit

Permalink
Merge pull request #292 from Snuffy2/Add-VPN-Connected-Client-indicators
Browse files Browse the repository at this point in the history
VPN connected instance indicators and fixing OpenVPN server logic
  • Loading branch information
Snuffy2 authored Oct 24, 2024
2 parents e7b9259 + c559bae commit ff6c62b
Show file tree
Hide file tree
Showing 4 changed files with 223 additions and 116 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 ff6c62b

Please sign in to comment.