mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-07-18 01:34:24 +02:00
merged get_sfp into path
This commit is contained in:
parent
8efaa72492
commit
7782503f78
2 changed files with 10 additions and 34 deletions
|
@ -786,7 +786,11 @@ class MikrotikControllerData:
|
|||
):
|
||||
self.data["interface"] = parse_api(
|
||||
data=self.data["interface"],
|
||||
source=self.api.get_sfp(vals[".id"]),
|
||||
source=self.api.path(
|
||||
"/interface/ethernet",
|
||||
command="monitor",
|
||||
args={".id": vals[".id"], "once": True},
|
||||
),
|
||||
key_search="name",
|
||||
vals=[
|
||||
{"name": "status", "default": "unknown"},
|
||||
|
@ -814,7 +818,11 @@ class MikrotikControllerData:
|
|||
else:
|
||||
self.data["interface"] = parse_api(
|
||||
data=self.data["interface"],
|
||||
source=self.api.get_sfp(vals[".id"]),
|
||||
source=self.api.path(
|
||||
"/interface/ethernet",
|
||||
command="monitor",
|
||||
args={".id": vals[".id"], "once": True},
|
||||
),
|
||||
key_search="name",
|
||||
vals=[
|
||||
{"name": "status", "default": "unknown"},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue