mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-06-28 19:50:06 +02:00
Adjusted NAT unique test for new uniq-id key #20
This commit is contained in:
parent
49631e2826
commit
b8f3af480c
1 changed files with 3 additions and 3 deletions
|
@ -785,7 +785,7 @@ class MikrotikControllerData:
|
|||
nat_uniq = {}
|
||||
nat_del = {}
|
||||
for uid in self.data["nat"]:
|
||||
tmp_name = self.data["nat"][uid]["name"]
|
||||
tmp_name = self.data["nat"][uid]["uniq-id"]
|
||||
if tmp_name not in nat_uniq:
|
||||
nat_uniq[tmp_name] = uid
|
||||
else:
|
||||
|
@ -793,8 +793,8 @@ class MikrotikControllerData:
|
|||
nat_del[nat_uniq[tmp_name]] = 1
|
||||
|
||||
for uid in nat_del:
|
||||
if self.data["nat"][uid]["name"] not in self.nat_removed:
|
||||
self.nat_removed[self.data["nat"][uid]["name"]] = 1
|
||||
if self.data["nat"][uid]["uniq-id"] not in self.nat_removed:
|
||||
self.nat_removed[self.data["nat"][uid]["uniq-id"]] = 1
|
||||
_LOGGER.error(
|
||||
"Mikrotik %s duplicate NAT rule %s, entity will be unavailable.",
|
||||
self.host,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue